Skip to content

Commit

Permalink
Die when no config object provided
Browse files Browse the repository at this point in the history
Just a friendlier error message, when `boot.php` is included without a
global `$config` object being set.
  • Loading branch information
cschorn committed Oct 31, 2012
1 parent d46704d commit 3400c29
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions boot.php
Original file line number Diff line number Diff line change
@@ -1,7 1,9 @@
<?php

// Load configuration
$config = GitList\Config::fromFile('config.ini');
if (!isset($config)) {
die("No configuration object provided.");
}

$config->set('git', 'repositories', rtrim($config->get('git', 'repositories'), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR);

// Startup and configure Silex application
Expand Down

0 comments on commit 3400c29

Please sign in to comment.