Skip to content

Commit

Permalink
Update list.php
Browse files Browse the repository at this point in the history
 Invalid argument supplied for foreach() in /htdocs/asset/list.php on line 410
  • Loading branch information
frederic34 committed Nov 3, 2019
1 parent 4909a21 commit 0de1c5b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions htdocs/asset/list.php
Expand Up @@ -407,9 +407,13 @@ function init_myfunc()

// Detect if we need a fetch on each output line
$needToFetchEachLine=0;
foreach ($extrafields->attributes[$object->table_element]['computed'] as $key => $val)
{
if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object
if (is_array($extrafields->attributes[$object->table_element]['computed'])) {
foreach ($extrafields->attributes[$object->table_element]['computed'] as $key => $val) {
if (preg_match('/\$object/', $val)) {
// There is at least one compute field that use $object
$needToFetchEachLine++;
}
}
}


Expand Down

0 comments on commit 0de1c5b

Please sign in to comment.