Pages: 1
Hello/Hi/Greetings,
I believe this is a bug in the Community plugin.
When I try to Explore>Edit Photo>Add Keywords I get the following error after having added a keyword and clicked "Apply Action":
Warning : count(): Parameter must be an array or an object that implements Countable in {my directory}/plugins/community/edit_photos.php on line 338 Warning : count(): Parameter must be an array or an object that implements Countable in {my directory}/include/functions_html.inc.php on line 639
The section in community/edit_photos.php is
if (count($page['infos']) != 0) { $template->assign('infos', $page['infos']); }
The section in include/functions_html.inc.php is
if (count($page[$mode]) != 0) { $template->assign($mode, $page[$mode]); }
After writing all this up I realized that these are warning not errors. The tags do in fact get added. Is this some PHP compatibility issue? If it is, would someone be so kind to add it in the bug tracker if that is needed. I don't really know about those things.
I'm also realizing that Piwigo shouldn't be showing those messages unless I have enabled them, which I don't think I have. Maybe there is some new default that turns them on in new installs?
Piwigo 2.10.2
Operating system: Linux
PHP: 7.2.34 (Show info) [2020-10-30 01:10:53]
MySQL: 5.7.28-log [2020-10-30 01:10:53]
Graphics Library: ImageMagick 6.9.7-4
Offline
There are a couple of things you can check... depending on what you have access to on your web hosting platform.
If you can access PHP settings and values:
While PHP code execution may trigger warnings, being informational warnings, errors or about function deprecations, you can mostly turn that off. PHP has a parameter for showing errors, check if it is enabled.
You are running PHP 7.2 branch, see if you can upgrade to 7.4 branch.
---
In order to add things to the bug tracker I am afraid you may have to do that yourself on Github...with a Github account... https://github.com/Piwigo
Offline
BTW I also use the Community plugin but don't get those errors, don't recognise them at all.
Best plugin ever, really the pure lifeblood for a couple of my sites.
Last edited by homdax (2020-10-30 11:44:26)
Offline
@Homdax Thanks! I was able to disable the warnings by adding $conf['show_php_errors'] = E_ERROR;
to my localfiles config.
I think I was at 7.4 earlier but downgraded to solve some other problem. I've been doing so much modding and debugging that I can't remember why.
And yes, Community almost seems like it should be core, or at least installed with a new site. The site I am building couldn't exist without Community. Thank you to the devs!
Offline
piwent wrote:
I think I was at 7.4 earlier but downgraded to solve some other problem. I've been doing so much modding and debugging that I can't remember why.
I don't want to know. I have a entire site dedicated to keep track of every detail in my projects, running http://qdpm.net/...
Offline
if you have cPanel then error reporting can be configured in PHP options
https://piwigo.org/forum/viewtopic.php? … 58#p177358
Offline
Pages: 1