Problems in PHP 7.2.5

Phoca Gallery - image gallery extension
tekfix
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 27 Feb 2014, 10:38

Problems in PHP 7.2.5

Post 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?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problems in PHP 7.2.5

Post 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
If you find Phoca extensions useful, please support the project
jobrusche
Phoca Member
Phoca Member
Posts: 18
Joined: 18 Apr 2012, 16:26

Re: Problems in PHP 7.2.5

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problems in PHP 7.2.5

Post 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
If you find Phoca extensions useful, please support the project
jobrusche
Phoca Member
Phoca Member
Posts: 18
Joined: 18 Apr 2012, 16:26

Re: Problems in PHP 7.2.5

Post by jobrusche »

5 months later now ... are we any closer to a release with this fix ?

All the best for 2019, happy bugsolving ..
Johan.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problems in PHP 7.2.5

Post 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
If you find Phoca extensions useful, please support the project
Fred1948
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 12 Jan 2019, 16:52

Re: Problems in PHP 7.2.5

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problems in PHP 7.2.5

Post 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
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47810
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problems in PHP 7.2.5

Post by Jan »

Hi Fred1948,

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

Jan
If you find Phoca extensions useful, please support the project
gap
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 11 Nov 2016, 20:25

Re: Problems in PHP 7.2.5

Post 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
Post Reply