Hi,
I get two warning lines at the top of the screen when I add keyword to the photos:
Warning: count(): Parameter must be an array or an object that implements Countable in /config/www/gallery/plugins/community/edit_photos.php on line 338
Warning: count(): Parameter must be an array or an object that implements Countable in /config/www/gallery/include/functions_html.inc.php on line 690
The tagging is happen and I can select photos by this keyword.
How could I solve it?
Thank you.
My config:
Piwigo 11.3.0
Operating system: Linux
PHP: 7.3.26 (Show info) [2021-02-14 13:10:06]
MySQL: 5.5.5-10.5.8-MariaDB-1:10.5.8+maria~focal [2021-02-14 13:10:06]
Graphics Library: ImageMagick 7.0.10-48
Active plugins:
Community: 11.b
Upload 1 menu: 11.0.a
Inactive plugins:
Admin Tools
Language switch
LocalFiles Editor
Take A Tour of Your Piwigo
Theme:
Bootstrap Darkroom: 2.4.4
Offline
Apparently a quirk of the Community plugin, see also [Forum, topic 30707] [Community] plugin PHP warning:Parameter must be an array or an object
If it extensively annoys you you could exclude warnings from PHP error reporting, but I'd rather live with these at this one place than missing other warnings. Probably worth reporting the problem in the plugin's issue tracker.
Offline
Hi erAck,
Thank you very much for your quick answer. I’ll try to live with this warnings.
Best regards
Offline
Another option I often use in production environments is adding something like this to my php.ini or a local.ini file. Errors aren't displayed on screen, but are written to the error_log file. If you never look at that file, there's no use logging them.
display_errors = Off error_log = /config/php/errors.log
Offline
Hi ckayfish,
I tried to add the code to my php.ini, there were warnings in the errors.log file, but the warning messages were shown at the top of the screen. By adding $conf['show_php_errors']=E_ERROR to my local config file solved the warnings at the end.
Thank you very much for your help.
Offline