Merge pull request #12313 from frederic34/patch-6

Update list.php
This commit is contained in:
Laurent Destailleur 2019-11-04 20:38:21 +01:00 committed by GitHub
commit 4566159e69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -407,9 +407,13 @@ print '</tr>'."\n";
// 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++;
}
}
}