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:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user