Error when running PHP v7.1

Admiror Gallery 5.x.x for Joomla 3.x. support forum.
Post Reply
Message
Author
wiggum
Posts: 2
Joined: Fri Mar 09, 2018 9:24 pm

Error when running PHP v7.1

#1 Post by wiggum »

Dear,

When activating the latest version of the Admiror Gallery plugin in Joomla 3.5.8 running PHP v7.1, you get PHP compatibility errors.

Have you checked and validated the plugin code is PHP V7.1 compliant?

PS: It does not block the plugin from functioning, nor does it make Joomla send HTTP errors. So when not running in debug mode / max error reporting level, you will not notice the errors.

Admiror Gallery 5 - Fundraising Campaign

wiggum
Posts: 2
Joined: Fri Mar 09, 2018 9:24 pm

Re: Error when running PHP v7.1

#2 Post by wiggum »

To be more precise, the error code you're getting is this one:
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; plgContentAdmirorGallery has a deprecated constructor in httpd.www/plugins/content/admirorgallery/admirorgallery.php on line 18
That line 18 appears to be this piece of code:

Code: Select all

class plgContentAdmirorGallery extends JPlugin {

User avatar
Vasiljevski
Developer
Developer
Posts: 1258
Joined: Sat Aug 14, 2010 9:31 pm
Location: Novi Sad, Serbia
Contact:

Re: Error when running PHP v7.1

#3 Post by Vasiljevski »

This is just a warning, the latest version should fix this.

You can fix this on your side by adding, to admirorgallery.php:

Code: Select all

//Constructor
    function __construct(&$subject, $params) {
        parent::__construct($subject, $params);
        // load current language
        $this->loadLanguage();
    }
Help Admiror Gallery become even better,
give us a review on JED

Post Reply