#1 2021-02-16 18:31:31

pasaonpiwigo
Member
2021-02-14
11

Adding keywords: Parameter must be an array or an object

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

 

#2 2021-02-16 20:35:40

erAck
Only trying to help
2015-09-06
2237

Re: Adding keywords: Parameter must be an array or an object

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.


Running Piwigo at https://erack.net/gallery/

Offline

 

#3 2021-02-16 21:11:20

pasaonpiwigo
Member
2021-02-14
11

Re: Adding keywords: Parameter must be an array or an object

Hi erAck,
Thank you very much for your quick answer. I’ll try to live with this warnings.
Best regards

Offline

 

#4 2021-02-17 05:51:53

ckayfish
Member
2021-01-25
53

Re: Adding keywords: Parameter must be an array or an object

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.

Code:

display_errors = Off
error_log = /config/php/errors.log

--- devOps engineer; sometimes coder. I make your apps run with 99.999% uptime ---

Offline

 

#5 2021-02-17 11:47:33

pasaonpiwigo
Member
2021-02-14
11

Re: Adding keywords: Parameter must be an array or an object

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

 

Board footer

Powered by FluxBB