From 4cbe463b4c442e0e2dae2f43565e77f7ac5ecb86 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Wed, 21 Jan 2015 22:56:22 +0100 Subject: Remove closing blocks at end of PHP files --- system/core/CodeIgniter.php | 3 --- 1 file changed, 3 deletions(-) (limited to 'system/core/CodeIgniter.php') diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 59fdba0e5..8c936e018 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -533,6 +533,3 @@ if ( ! is_php('5.4')) * ------------------------------------------------------ */ $EXT->call_hook('post_system'); - -/* End of file CodeIgniter.php */ -/* Location: ./system/core/CodeIgniter.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 17254324f9887c5fa511b94a3b17c8c4d82b2c8f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 30 Jan 2015 15:53:28 +0200 Subject: [ci skip] Load vendor/autoload.php earlier --- system/core/CodeIgniter.php | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'system/core/CodeIgniter.php') diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 8c936e018..839caba08 100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php @@ -157,6 +157,23 @@ if ( ! is_php('5.4')) get_config(array('subclass_prefix' => $assign_to_config['subclass_prefix'])); } +/* + * ------------------------------------------------------ + * Should we use a Composer autoloader? + * ------------------------------------------------------ + */ + if ($composer_autoload = config_item('composer_autoload')) + { + if ($composer_autoload === TRUE && file_exists(APPPATH.'vendor/autoload.php')) + { + require_once(APPPATH.'vendor/autoload.php'); + } + elseif (file_exists($composer_autoload)) + { + require_once($composer_autoload); + } + } + /* * ------------------------------------------------------ * Start the timer... tick tock tick tock... @@ -459,23 +476,6 @@ if ( ! is_php('5.4')) $params = array_slice($URI->rsegments, 2); } -/* - * ------------------------------------------------------ - * Should we use a Composer autoloader? - * ------------------------------------------------------ - */ - if ($composer_autoload = config_item('composer_autoload')) - { - if ($composer_autoload === TRUE && file_exists(APPPATH.'vendor/autoload.php')) - { - require_once(APPPATH.'vendor/autoload.php'); - } - elseif (file_exists($composer_autoload)) - { - require_once($composer_autoload); - } - } - /* * ------------------------------------------------------ * Is there a "pre_controller" hook? -- cgit v1.2.3-24-g4f1b From 2eb580cff726160f737da2e36ebae7e60d676e30 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 30 Jan 2015 16:41:43 +0200 Subject: Log an error message if composer_autoload is not found. --- system/core/CodeIgniter.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'system/core/CodeIgniter.php') 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); + } } /* -- cgit v1.2.3-24-g4f1b