The package was working mostly fine for us until we updated our php version to php8. Since then it seems that the helpers do not get loaded properly.
|
$perm = $this->helper->has_permission(); |
throws the error "Error: Call to a member function has_permission() on null".
--EDIT:
On the Backward Incompatible Changes page for PHP80, they mention
Methods with the same name as the class are no longer interpreted as constructors. The __construct() method should be used instead.
So I think that replacing
|
function action_plugin_news() { |
by
public function __construct(){ should solve it.
I do not program in PHP so I would like someone with a bit more experience in the language to check it before making a merge pull request...
The package was working mostly fine for us until we updated our php version to php8. Since then it seems that the helpers do not get loaded properly.
news/action.php
Line 36 in 556847f
throws the error "Error: Call to a member function has_permission() on null".
--EDIT:
On the Backward Incompatible Changes page for PHP80, they mention
So I think that replacing
news/action.php
Line 24 in 556847f
by
public function __construct(){should solve it.I do not program in PHP so I would like someone with a bit more experience in the language to check it before making a merge pull request...