MantisBT: master c17ba0a1

Author Committer Branch Timestamp Parent
dregad dregad master 2019-05-05 10:43 master 5cd6831f
Changeset

plugin_register(): improve invalid plugins handling

Previously, the function would return null if the plugin could not be
registered.

It now exclusively returns a MantisPlugin object, and in case of
registration errors, the returned object will be a special subclass:

  • InvalidPlugin: if the plugin's name or version is not defined
  • MissingClassPlugin: if the source code can't be found or loaded

These errors will also be added to the MantisBT log (LOG_PLUGIN event).

mod - core/plugin_api.php Diff File
mod - manage_plugin_upgrade.php Diff File