mirror of
https://github.com/flarum/framework.git
synced 2025-02-28 18:28:40 +08:00
Don't break compatibility with extensions that return a function name
eg. s9e/mediaembed
This commit is contained in:
parent
4af6acdbda
commit
c4b8875be2
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user