Merge pull request #8253 from ruistrecht-alt/Fix_supress_count_warning_in_extrafields_view_tpl

FIX Suppress count warning in admin_extrafields_view.tpl
This commit is contained in:
Laurent Destailleur 2018-03-02 18:00:52 +01:00 committed by GitHub
commit 0a5edb871b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ if ($conf->multicompany->enabled) {
print '<td width="80">&nbsp;</td>'; print '<td width="80">&nbsp;</td>';
print "</tr>\n"; print "</tr>\n";
if (count($extrafields->attributes[$elementtype]['type'])) if (is_array($extrafields->attributes[$elementtype]['type']) && count($extrafields->attributes[$elementtype]['type']))
{ {
foreach($extrafields->attributes[$elementtype]['type'] as $key => $value) foreach($extrafields->attributes[$elementtype]['type'] as $key => $value)
{ {