diff --git a/bootstrap.php b/bootstrap.php index 6f5541a..e724f44 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -28,7 +28,11 @@ public function register() { } // TODO: Load the *correct* composer.json in a decent OO way. // Parse the composer.json. - Loader::setClassMap(json_decode(file_get_contents('composer.json'))); + $composer_config = json_decode(file_get_contents('composer.json')); + if (empty($composer_config['class-loader']['drupal-path'])) { + return; + } + Loader::setClassMap($composer_config['class-loader']['drupal-path']); $this::load(); }