Page 1 of 2

Problems in PHP 7.2.5

Posted: 13 Jun 2018, 08:33
by tekfix
Joomla 3.8.8 and Phoca Gallery 4.3.10. My webhotel operator updated the server to PHP 7.2.5 and now the categories view show nothing at all. When I enable maximum error reporting I get a long list of warnings:

Warning: count(): Parameter must be an array or an object that implements Countable in /home/en/www/administrator/components/com_phocagallery/libraries/phocagallery/image/imagefront.php on line 474

How can I fix this?

Re: Problems in PHP 7.2.5

Posted: 13 Jun 2018, 15:52
by Jan
Hi, try to open this file:
administrator\components\com_phocagallery\libraries\phocagallery\image\imagefront.php

and on line cca 470 change
FROM:

Code: Select all

if ($rightDisplay == 0) {
			$images = 0;
		}
TO:

Code: Select all

if ($rightDisplay == 0) {
			$images = array(0);
		}
and let me know if it works for you.

Jan

Re: Problems in PHP 7.2.5

Posted: 04 Aug 2018, 18:16
by jobrusche
Hi Jan,

Have the same warning on PHP 7.2 and switched PHP back to 7.1 on the host.
Can you give us a timetable for when this wil be fixed in an official release of PhocaGallery ?

Thanks in advance,
Johan.

Re: Problems in PHP 7.2.5

Posted: 07 Aug 2018, 13:35
by Jan
Hi, really hard to say, as they are some more tasks (for another extensions) in the stack, so really hard to say (the only one I can say is, it will be in next release) :-(

Jan

Re: Problems in PHP 7.2.5

Posted: 30 Dec 2018, 15:00
by jobrusche
5 months later now ... are we any closer to a release with this fix ?

All the best for 2019, happy bugsolving ..
Johan.

Re: Problems in PHP 7.2.5

Posted: 31 Dec 2018, 20:32
by Jan
Hi, unfortunatelly, because of time issues, warnings for developers have low priorities (as they can be easily disabled or quick fixed, they really need to wait - the biggest time problem is when you relese new version you need to release it with all the bugs/planned feature requests, etc. so it is not only one warning waiting - if yes, such will be immediately released )

Jan

Re: Problems in PHP 7.2.5

Posted: 12 Jan 2019, 16:57
by Fred1948
I have this when the images are displayed as a slideshow:

Warning: Illegal string offset 'w' in /home/magnolia/public_html/joomla/administrator/components/com_phocagallery/libraries/phocagallery/image/image.php on line 52

Warning: Illegal string offset 'h' in /home/magnolia/public_html/joomla/administrator/components/com_phocagallery/libraries/phocagallery/image/image.php on line 53
I Think something with Widt and Height?
Fred

Re: Problems in PHP 7.2.5

Posted: 13 Jan 2019, 13:59
by Jan
Hi, thank you, I will take a look at it for the next version, for now just disable warning for developers.

Thank you, Jan

Re: Problems in PHP 7.2.5

Posted: 14 Jan 2019, 17:58
by Jan
Hi Fred1948,

which version of Phoca Gallery do you use, tesing now in 4.3.10 without any such problem :idea:

Jan

Re: Problems in PHP 7.2.5

Posted: 15 Feb 2019, 20:48
by gap
I updated php 7.0.33 to php 7.2.6 and Joomla to 9.3
and got on an article where phoca gallery plugin codes are:
0 [] operator not supported for strings
Then updated to com_phocagallery_v4.3.12.zip but problem still exists.

What should I do? thanks

DEBUG
Call stack
# Function Location
1 () JROOT/plugins/content/phocagallery/phocagallery.php:886
2 plgContentPhocaGallery->onContentPrepare() JROOT/libraries/joomla/event/event.php:70
3 JEvent->update() JROOT/libraries/joomla/event/dispatcher.php:160
4 JEventDispatcher->trigger() JROOT/components/com_content/views/article/view.html.php:193
5 ContentViewArticle->display() JROOT/libraries/src/MVC/Controller/BaseController.php:672
6 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/components/com_content/controller.php:118
7 ContentController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:710
8 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/components/com_content/content.php:43
9 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
10 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
11 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
12 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
13 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:196
14 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49