diff options
author | Andrey Andreev <narf@devilix.net> | 2015-01-30 15:41:43 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2015-01-30 15:41:43 +0100 |
commit | 2eb580cff726160f737da2e36ebae7e60d676e30 (patch) | |
tree | bd0e77b0128603c7776d9d9b9c62f7fb3ce04a24 /system/core/CodeIgniter.php | |
parent | 17254324f9887c5fa511b94a3b17c8c4d82b2c8f (diff) |
Log an error message if composer_autoload is not found.
Diffstat (limited to 'system/core/CodeIgniter.php')
-rw-r--r-- | system/core/CodeIgniter.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 839caba08..d830c1829 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -164,14 +164,20 @@ if ( ! is_php('5.4')) */ if ($composer_autoload = config_item('composer_autoload')) { - if ($composer_autoload === TRUE && file_exists(APPPATH.'vendor/autoload.php')) + if ($composer_autoload === TRUE) { - require_once(APPPATH.'vendor/autoload.php'); + file_exists(APPPATH.'vendor/autoload.php') + ? require_once(APPPATH.'vendor/autoload.php') + : log_message('error', '$config[\'composer_autoload\'] is set to TRUE but '.APPPATH.'vendor/autoload.php was not found.'); } elseif (file_exists($composer_autoload)) { require_once($composer_autoload); } + else + { + log_message('error', 'Could not find the specified $config[\'composer_autoload\'] path: '.$composer_autoload); + } } /* |