<div dir="ltr"><div>Hi,<br><br></div>As I was updating my development pmwiki's web environment, I noticed the following warning while editing a wiki page:<br><br><b>Warning</b>:  count(): Parameter must be an array or an object that implements Countable in <b>/home/debian/websites/<a href="http://wiki.dfaure.fr/scripts/forms.php">wiki.dfaure.fr/scripts/forms.php</a></b> on line <b>109</b><br><br>The running context:<br>* php7.2 version 7.2.1-1+0~20180105151615.16+stretch~1.gbpd3910a as provided by the debian php maintainer on <a href="https://packages.sury.org/php">https://packages.sury.org/php</a><br><div>* PmWiki latest release version<br clear="all"></div><div><div><br></div><div>In the offending line:<br><br>  while (count($posnames) > 0 && count(@$args['']) > 0) {<br></div><div><br></div><div>The $args array is being left empty by a previous ParseArgs() call when processing the page edit form specific (:input ...:) directives which don't provide extra arguments (I didn't made further tests on other forms).<br><br></div><div>As a simple fix, the previous line could be rewritten as:<br></div><div><br>  while (count($posnames) > 0 && @count($args['']) > 0) {<br><div><br></div>Regards<br></div><div>-- <br><div class="gmail_signature"><div dir="ltr">Dominique</div></div>
</div></div></div>