1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 05:30:38 +02:00

Don't break compatibility with extensions that return a function name

eg. s9e/mediaembed
This commit is contained in:
Toby Zerner
2018-01-31 07:20:49 +10:30
parent 557a65aadd
commit 7651907f56

View File

@@ -292,7 +292,7 @@ class ExtensionManager
// If an extension has not yet switched to the new bootstrap.php // If an extension has not yet switched to the new bootstrap.php
// format, it might return a function (or more of them). We wrap // format, it might return a function (or more of them). We wrap
// these in a Compat extender to enjoy an unique interface. // these in a Compat extender to enjoy an unique interface.
if ($extender instanceof \Closure) { if ($extender instanceof \Closure || is_string($extender)) {
return new Compat($extender); return new Compat($extender);
} else { } else {
return $extender; return $extender;