Skip to content

Commit

Permalink
Use the correct class map
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateu Aguiló Bosch committed Jun 14, 2015
1 parent cf4bf1a commit b5fed50
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit b5fed50

Please sign in to comment.