We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f1b17d commit 4e1d501Copy full SHA for 4e1d501
1 file changed
lib/private/Server.php
@@ -643,10 +643,16 @@ public function __construct($webRoot, \OC\Config $config) {
643
return $factory->getManager();
644
});
645
$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
+ /*
+ * Dark magic for autoloader.
+ * If we do a class_exists it will try to load the class which will
+ * 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 {
656
$classExists = false;
657
}
658
0 commit comments