Fix loop on not countable object

This commit is contained in:
Laurent Destailleur 2020-02-24 23:14:15 +01:00
parent 4a6e491334
commit 504f8fa2e4

View File

@ -286,7 +286,7 @@ if (empty($reshook))
$lines = $srcobject->lines; $lines = $srcobject->lines;
} }
$fk_parent_line = 0; if (is_array($lines)) {
$num = count($lines); $num = count($lines);
for ($i = 0; $i < $num; $i++) for ($i = 0; $i < $num; $i++)
@ -383,6 +383,7 @@ if (empty($reshook))
} }
} }
} }
}
else else
{ {
$mesg = $srcobject->error; $mesg = $srcobject->error;