# PluginBundleBase error

**URL:** <https://forum.mautic.org/t/pluginbundlebase-error/2506>\
**Category:** Development\
**Created:** [October 22, 2015, 10:39am UTC](https://forum.mautic.org/t/pluginbundlebase-error/2506 "2015-10-22T10:39:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![enzo](https://avatars.discourse-cdn.com/v4/letter/e/3ab097/32.png) [@enzo](https://forum.mautic.org/u/enzo)\
**Post date:** [October 22, 2015, 10:39am UTC](https://forum.mautic.org/t/pluginbundlebase-error/2506/1 "2015-10-22T10:39:04Z")

</div>

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](http://php.net/manual/en/language.oop5.late-static-bindings.php#language.oop5.late-static-bindings.self)

---

<div class="post-metadata">

**Author:** ![enzo](https://avatars.discourse-cdn.com/v4/letter/e/3ab097/32.png) [@enzo](https://forum.mautic.org/u/enzo)\
**Post date:** [October 22, 2015, 10:39am UTC](https://forum.mautic.org/t/pluginbundlebase-error/2506/2 "2015-10-22T10:39:04Z")

</div>

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](http://php.net/manual/en/language.oop5.late-static-bindings.php#language.oop5.late-static-bindings.self)

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [October 22, 2015, 1:09pm UTC](https://forum.mautic.org/t/pluginbundlebase-error/2506/3 "2015-10-22T13:09:55Z")

</div>

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](https://github.com/mautic/mautic)

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

---

<div class="post-metadata">

**Author:** ![enzo](https://avatars.discourse-cdn.com/v4/letter/e/3ab097/32.png) [@enzo](https://forum.mautic.org/u/enzo)\
**Post date:** [October 23, 2015, 7:40am UTC](https://forum.mautic.org/t/pluginbundlebase-error/2506/4 "2015-10-23T07:40:00Z")

</div>

done

---

<div class="post-metadata">

**Author:** ![escopecz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/escopecz/32/370_2.png) [@escopecz](https://forum.mautic.org/u/escopecz)\
**Post date:** [October 23, 2015, 7:44am UTC](https://forum.mautic.org/t/pluginbundlebase-error/2506/5 "2015-10-23T07:44:12Z")

</div>

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

[https://github.com/mautic/mautic/pull/1045](https://github.com/mautic/mautic/pull/1045)

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [February 2, 2020, 10:57pm UTC](https://forum.mautic.org/t/pluginbundlebase-error/2506/6 "2020-02-02T22:57:35Z")

</div>


