mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-18 03:30:55 +01:00
Die when no config object provided
Just a friendlier error message, when `boot.php` is included without a global `$config` object being set.
This commit is contained in:
6
boot.php
6
boot.php
@@ -1,7 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
// Load configuration
|
if (!isset($config)) {
|
||||||
$config = GitList\Config::fromFile('config.ini');
|
die("No configuration object provided.");
|
||||||
|
}
|
||||||
|
|
||||||
$config->set('git', 'repositories', rtrim($config->get('git', 'repositories'), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR);
|
$config->set('git', 'repositories', rtrim($config->get('git', 'repositories'), DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR);
|
||||||
|
|
||||||
// Startup and configure Silex application
|
// Startup and configure Silex application
|
||||||
|
|||||||
Reference in New Issue
Block a user