Avoid warning about non-countable var, fix #587.

This commit is contained in:
Hanno 2019-01-11 08:32:53 +01:00 committed by onli
parent e3aaefd2e9
commit 4445926033

View File

@ -137,7 +137,7 @@ function serendipity_printEntryForm($targetURL, $hiddens = array(), $entry = arr
$template_vars['errMsg'] = $errMsg;
$template_vars['entry'] =& $entry;
$template_vars['targetURL'] = $targetURL;
$template_vars['cat_count'] = count($cats)+1;
$template_vars['cat_count'] = is_array($cats) ? (count($cats)+1) : 1;
$template_vars['wysiwyg'] = $serendipity['wysiwyg'];
$template_vars['serendipityRightPublish'] = $_SESSION['serendipityRightPublish'];
$template_vars['wysiwyg_blocks'] = array(