forked from extern/egroupware
Fixed, PHP Warning: Invalid argument supplied for foreach() in ...
This commit is contained in:
parent
520e17c1b2
commit
e5d23b93cf
@ -165,16 +165,22 @@ class Schema
|
|||||||
$columns = implode('-',$columns);
|
$columns = implode('-',$columns);
|
||||||
if ($ignore_length_limit) $columns = preg_replace('/\(\d+\)/', '', $columns);
|
if ($ignore_length_limit) $columns = preg_replace('/\(\d+\)/', '', $columns);
|
||||||
}
|
}
|
||||||
foreach($indexs as $index)
|
|
||||||
{
|
if(is_array($indexs)){
|
||||||
if (is_array($index))
|
|
||||||
|
foreach($indexs as $index)
|
||||||
{
|
{
|
||||||
unset($index['options']);
|
if (is_array($index))
|
||||||
$index = implode('-',$index);
|
{
|
||||||
|
unset($index['options']);
|
||||||
|
$index = implode('-',$index);
|
||||||
|
}
|
||||||
|
if ($ignore_length_limit) $index = preg_replace('/\(\d+\)/', '', $index);
|
||||||
|
if ($columns == $index) return true;
|
||||||
}
|
}
|
||||||
if ($ignore_length_limit) $index = preg_replace('/\(\d+\)/', '', $index);
|
|
||||||
if ($columns == $index) return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,11 +180,16 @@ class importexport_definition implements importexport_iface_egw_record {
|
|||||||
*/
|
*/
|
||||||
private function set_options(array $_plugin_options) {
|
private function set_options(array $_plugin_options) {
|
||||||
// Check conditions
|
// Check conditions
|
||||||
foreach ( $_plugin_options['conditions'] as $key => $condition ) {
|
|
||||||
if(!$condition['string'])
|
if (is_array($_plugin_options['conditions'] )){
|
||||||
{
|
|
||||||
unset($_plugin_options['conditions'][$key]);
|
foreach ( $_plugin_options['conditions'] as $key => $condition ) {
|
||||||
|
if(!$condition['string'])
|
||||||
|
{
|
||||||
|
unset($_plugin_options['conditions'][$key]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
$this->definition['plugin_options'] = $_plugin_options;
|
$this->definition['plugin_options'] = $_plugin_options;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user