mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 09:23:28 +01:00
Merge pull request #62 from asig2016/for_each
Fixed, PHP Warning: Invalid argument supplied for foreach() in ...
This commit is contained in:
commit
a154557512
@ -165,6 +165,9 @@ class Schema
|
||||
$columns = implode('-',$columns);
|
||||
if ($ignore_length_limit) $columns = preg_replace('/\(\d+\)/', '', $columns);
|
||||
}
|
||||
|
||||
if(is_array($indexs)){
|
||||
|
||||
foreach($indexs as $index)
|
||||
{
|
||||
if (is_array($index))
|
||||
@ -175,6 +178,9 @@ class Schema
|
||||
if ($ignore_length_limit) $index = preg_replace('/\(\d+\)/', '', $index);
|
||||
if ($columns == $index) return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -180,12 +180,17 @@ class importexport_definition implements importexport_iface_egw_record {
|
||||
*/
|
||||
private function set_options(array $_plugin_options) {
|
||||
// Check conditions
|
||||
|
||||
if (is_array($_plugin_options['conditions'] )){
|
||||
|
||||
foreach ( $_plugin_options['conditions'] as $key => $condition ) {
|
||||
if(!$condition['string'])
|
||||
{
|
||||
unset($_plugin_options['conditions'][$key]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
$this->definition['plugin_options'] = $_plugin_options;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user