If CMS module is loaded (and MediaManager exists) bind it
I am using OctoberCMS without the CMS module (removed from modules directory and turned off in cms.php) and I am getting an error in the backend regarding missing `MediaManager` class. I wrapped this in a class_exists to check that MediaManager exists before binding it. Let me know your thoughts.
This commit is contained in:
parent
97b0bc481f
commit
0a4390b4d9
|
|
@ -153,8 +153,10 @@ class Controller extends Extendable
|
|||
/*
|
||||
* Media Manager widget is available on all back-end pages
|
||||
*/
|
||||
$manager = new MediaManager($this, 'ocmediamanager');
|
||||
$manager->bindToController();
|
||||
if (class_exists('\\Cms\\Widgets\\MediaManager')) {
|
||||
$manager = new MediaManager($this, 'ocmediamanager');
|
||||
$manager->bindToController();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue