Avoid "Invalid argument supplied for foreach()"
This commit is contained in:
parent
8868b7f8d9
commit
2138c4bb55
|
@ -61,7 +61,11 @@ trait DatabaseTestTrait
|
|||
$data = include $fixture;
|
||||
|
||||
foreach ($data as $tableName => $rows) {
|
||||
if (!is_array($rows) && !is_numeric($tableName)) {
|
||||
if (is_numeric($tableName)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!is_array($rows)) {
|
||||
$dba->p('TRUNCATE TABLE `' . $tableName . '``');
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue