From A Constructor is Deprecated - Question | JoomShaper

From A Constructor is Deprecated

J

John

SP Page Builder 5 days ago

Hello Joomshaper,

I just updated the SPPB from 6.6.2 to 6.7.0, and an error message has appeared:

Deprecated: Returning a value from a constructor is deprecated in /home/customer/www/xxx.com/public_html/components/com_sppagebuilder/parser/addons.php on line 51

Then I located the below code:

public function __construct($addon) { if (!$addon) { return false; } $this->addon = $addon; }

After I deleted this line: return false;

The error disappears.

Please let me know if the above corrections are feasible, and is there any other places need to be fixed?

Thank you. John

0
3 Answers
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 5 days ago #229734

Hi John,

Are you using PHP 8.5 there?

I will ask our developer to check that, big thanks for analize.

0
J
John
Accepted Answer
5 days ago #229742

Hi Paul,

I am using PHP 8.6.0, thanks.

John

0
Paul Frankowski
Paul Frankowski
Accepted Answer
Senior Staff 5 days ago #229809

unfortunately, we are not fully ready for PHP 8.6 yet, that's why.

anyway, thanks

0