[pmwiki-devel] PHP 7.2 Warning while editing wiki pages
Dominique Faure
dominique.faure at gmail.com
Mon Jan 8 08:11:04 CST 2018
Hi,
As I was updating my development pmwiki's web environment, I noticed the
following warning while editing a wiki page:
*Warning*: count(): Parameter must be an array or an object that implements
Countable in */home/debian/websites/wiki.dfaure.fr/scripts/forms.php
<http://wiki.dfaure.fr/scripts/forms.php>* on line *109*
The running context:
* php7.2 version 7.2.1-1+0~20180105151615.16+stretch~1.gbpd3910a as
provided by the debian php maintainer on https://packages.sury.org/php
* PmWiki latest release version
In the offending line:
while (count($posnames) > 0 && count(@$args['']) > 0) {
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).
As a simple fix, the previous line could be rewritten as:
while (count($posnames) > 0 && @count($args['']) > 0) {
Regards
--
Dominique
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-devel/attachments/20180108/1fca2754/attachment.html>
More information about the pmwiki-devel
mailing list