Mautic Community Forums

PluginBundleBase error

These 2 bugs in PluginBundleBase break plugin install / update.



Simple fix: replace in line 36



self::onInstall($factory);

with

static::onInstall($factory);





and replace in line 99



self::onUpdate($addon, $factory);

with

static::onUpdate($addon, $factory);



More info here: http://php.net/manual/en/language.oop5.late-static-bindings.php#language.oop5.late-static-bindings.self

These 2 bugs in PluginBundleBase break plugin install / update.

Simple fix: replace in line 36

self::onInstall($factory);
with
static::onInstall($factory);

and replace in line 99

self::onUpdate($addon, $factory);
with
static::onUpdate($addon, $factory);

More info here: http://php.net/manual/en/language.oop5.late-static-bindings.php#language.oop5.late-static-bindings.self

Thanks for the code, but could you create a pull request with your changes so we could discuss it more comfortably?

https://github.com/mautic/mautic

When you do, please, describe what was the initial problem, what are the steps to recreate.

done

Thanks! Just to complete the information for others, the PR is here:

https://github.com/mautic/mautic/pull/1045