Fixed, PHP Warning: Invalid argument supplied for foreach() in ...

(skiped the importexport one, as it was already fixed by Nathan)
This commit is contained in:
Alexandros Sigalas 2019-03-05 08:51:22 +02:00 committed by Ralf Becker
parent 34db38b70d
commit 02d9accc94

View File

@ -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;
} }