Phoca Gallery error with PHP upgrade
Posted: 18 Aug 2020, 02:31
Upgrading from PHP 5.6 to > 7.1 the following error occurs: '0 - Using $this when not in object context'
Using Joomla debug information & Google the cause was found in line 370 of the following file: libraries\src\Application\CMSApplication.php
Changing line from : $options['app'] = $this;
To: $options['app'] = self;
Fixes the problem in the short term but at each Joomla update would seem to be over written. It would be nice to have a more permanent fix as Joomla updates are very regular.
Current Phoca Gallery is V4.3.18; Joomla is 3.9.20; PHP 7.3.5
This temporary fix works on both live server and local Wamp test site.
I am not sure whether it is a Phoca issue or Joomla - perhaps someone can advise.
Using Joomla debug information & Google the cause was found in line 370 of the following file: libraries\src\Application\CMSApplication.php
Changing line from : $options['app'] = $this;
To: $options['app'] = self;
Fixes the problem in the short term but at each Joomla update would seem to be over written. It would be nice to have a more permanent fix as Joomla updates are very regular.
Current Phoca Gallery is V4.3.18; Joomla is 3.9.20; PHP 7.3.5
This temporary fix works on both live server and local Wamp test site.
I am not sure whether it is a Phoca issue or Joomla - perhaps someone can advise.