File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -643,10 +643,16 @@ public function __construct($webRoot, \OC\Config $config) {
643643 return $ factory ->getManager ();
644644 });
645645 $ this ->registerService ('ThemingDefaults ' , function (Server $ c ) {
646- try {
647- $ classExists = class_exists ('OCA\Theming\ThemingDefaults ' );
648- } catch (\OCP \AutoloadNotAllowedException $ e ) {
649- // App disabled or in maintenance mode
646+ /*
647+ * Dark magic for autoloader.
648+ * If we do a class_exists it will try to load the class which will
649+ * make composer cache the result. Resulting in errors when enabling
650+ * the theming app.
651+ */
652+ $ prefixes = \OC ::$ composerAutoloader ->getPrefixesPsr4 ();
653+ if (isset ($ prefixes ['OCA \\Theming \\' ])) {
654+ $ classExists = true ;
655+ } else {
650656 $ classExists = false ;
651657 }
652658
You can’t perform that action at this time.
0 commit comments