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?
Problems in PHP 7.2.5
- Jan
- Phoca Hero
- Posts: 47810
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Problems in PHP 7.2.5
Hi, try to open this file:
administrator\components\com_phocagallery\libraries\phocagallery\image\imagefront.php
and on line cca 470 change
FROM:
TO:
and let me know if it works for you.
Jan
administrator\components\com_phocagallery\libraries\phocagallery\image\imagefront.php
and on line cca 470 change
FROM:
Code: Select all
if ($rightDisplay == 0) {
$images = 0;
}
Code: Select all
if ($rightDisplay == 0) {
$images = array(0);
}
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 18
- Joined: 18 Apr 2012, 16:26
Re: Problems in PHP 7.2.5
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.
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.
- Jan
- Phoca Hero
- Posts: 47810
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Problems in PHP 7.2.5
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
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 18
- Joined: 18 Apr 2012, 16:26
Re: Problems in PHP 7.2.5
5 months later now ... are we any closer to a release with this fix ?
All the best for 2019, happy bugsolving ..
Johan.
All the best for 2019, happy bugsolving ..
Johan.
- Jan
- Phoca Hero
- Posts: 47810
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Problems in PHP 7.2.5
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
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 1
- Joined: 12 Jan 2019, 16:52
Re: Problems in PHP 7.2.5
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
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
- Jan
- Phoca Hero
- Posts: 47810
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Problems in PHP 7.2.5
Hi, thank you, I will take a look at it for the next version, for now just disable warning for developers.
Thank you, Jan
Thank you, Jan
If you find Phoca extensions useful, please support the project
- Jan
- Phoca Hero
- Posts: 47810
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Problems in PHP 7.2.5
Hi Fred1948,
which version of Phoca Gallery do you use, tesing now in 4.3.10 without any such problem
Jan
which version of Phoca Gallery do you use, tesing now in 4.3.10 without any such problem
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 2
- Joined: 11 Nov 2016, 20:25
Re: Problems in PHP 7.2.5
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:
What should I do? thanks
DEBUG
and got on an article where phoca gallery plugin codes are:
Then updated to com_phocagallery_v4.3.12.zip but problem still exists.0 [] operator not supported for strings
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