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 » 13 Jun 2018, 08:33

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: 40655
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problems in PHP 7.2.5

Post by Jan » 13 Jun 2018, 15:52

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 Newbie
Phoca Newbie
Posts: 6
Joined: 18 Apr 2012, 16:26

Re: Problems in PHP 7.2.5

Post by jobrusche » 04 Aug 2018, 18:16

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: 40655
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problems in PHP 7.2.5

Post by Jan » 07 Aug 2018, 13:35

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 Newbie
Phoca Newbie
Posts: 6
Joined: 18 Apr 2012, 16:26

Re: Problems in PHP 7.2.5

Post by jobrusche » 30 Dec 2018, 15:00

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: 40655
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problems in PHP 7.2.5

Post by Jan » 31 Dec 2018, 20:32

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 » 12 Jan 2019, 16:57

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: 40655
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problems in PHP 7.2.5

Post by Jan » 13 Jan 2019, 13:59

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: 40655
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Problems in PHP 7.2.5

Post by Jan » 14 Jan 2019, 17:58

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

Post Reply