forked from extern/egroupware
Fix some PHP 7.2 warnings "PHP Warning: count() Parameter must be an array or object ..."
This commit is contained in:
parent
dba9a76246
commit
85a3b3e027
@ -216,11 +216,7 @@ class Customfields implements \IteratorAggregate
|
|||||||
|
|
||||||
case 'select':
|
case 'select':
|
||||||
case 'radio':
|
case 'radio':
|
||||||
if(!$field['values'])
|
if ($field['values'] && count($field['values']) == 1 && isset($field['values']['@']))
|
||||||
{
|
|
||||||
error_log("{$field['app']} custom field '{$field['name']}' has no values" );
|
|
||||||
}
|
|
||||||
else if (count($field['values']) == 1 && isset($field['values']['@']))
|
|
||||||
{
|
{
|
||||||
$field['values'] = self::get_options_from_file($field['values']['@']);
|
$field['values'] = self::get_options_from_file($field['values']['@']);
|
||||||
}
|
}
|
||||||
|
@ -780,7 +780,7 @@ abstract class Merge
|
|||||||
//die("<pre>".htmlspecialchars($content)."</pre>\n");
|
//die("<pre>".htmlspecialchars($content)."</pre>\n");
|
||||||
}
|
}
|
||||||
list($contentstart,$contentrepeat,$contentend) = preg_split('/\$\$pagerepeat\$\$/',$content,-1, PREG_SPLIT_NO_EMPTY); //get differt parts of document, seperatet by Pagerepeat
|
list($contentstart,$contentrepeat,$contentend) = preg_split('/\$\$pagerepeat\$\$/',$content,-1, PREG_SPLIT_NO_EMPTY); //get differt parts of document, seperatet by Pagerepeat
|
||||||
if ($mimetype == 'text/plain' && count($ids) > 1)
|
if ($mimetype == 'text/plain' && $ids && count($ids) > 1)
|
||||||
{
|
{
|
||||||
// textdocuments are simple, they do not hold start and end, but they may have content before and after the $$pagerepeat$$ tag
|
// textdocuments are simple, they do not hold start and end, but they may have content before and after the $$pagerepeat$$ tag
|
||||||
// header and footer should not hold any $$ tags; if we find $$ tags with the header, we assume it is the pagerepeatcontent
|
// header and footer should not hold any $$ tags; if we find $$ tags with the header, we assume it is the pagerepeatcontent
|
||||||
|
Loading…
Reference in New Issue
Block a user