|
4 | 4 | *
|
5 | 5 | * @link https://github.com/bcit-ci/CodeIgniter/blob/develop/system/core/CodeIgniter.php
|
6 | 6 | * @since Version 3.2.0
|
7 |
| - * @change 2018/09/12 |
| 7 | + * @change 2018/09/25 |
8 | 8 | */
|
9 | 9 |
|
10 | 10 |
|
|
65 | 65 | ini_set('default_charset', $charset);
|
66 | 66 | if (extension_loaded('mbstring'))
|
67 | 67 | {
|
68 |
| - define('MB_ENABLED', TRUE); |
| 68 | + !defined('MB_ENABLED') AND define('MB_ENABLED', TRUE); |
69 | 69 | // mbstring.internal_encoding is deprecated starting with PHP 5.6
|
70 | 70 | // and it's usage triggers E_DEPRECATED messages.
|
71 | 71 | @ini_set('mbstring.internal_encoding', $charset);
|
|
75 | 75 | }
|
76 | 76 | else
|
77 | 77 | {
|
78 |
| - define('MB_ENABLED', FALSE); |
| 78 | + !defined('MB_ENABLED') AND define('MB_ENABLED', FALSE); |
79 | 79 | }
|
80 | 80 | // There's an ICONV_IMPL constant, but the PHP manual says that using
|
81 | 81 | // iconv's predefined constants is "strongly discouraged".
|
82 | 82 | if (extension_loaded('iconv'))
|
83 | 83 | {
|
84 |
| - define('ICONV_ENABLED', TRUE); |
| 84 | + !defined('ICONV_ENABLED') AND define('ICONV_ENABLED', TRUE); |
85 | 85 | // iconv.internal_encoding is deprecated starting with PHP 5.6
|
86 | 86 | // and it's usage triggers E_DEPRECATED messages.
|
87 | 87 | @ini_set('iconv.internal_encoding', $charset);
|
88 | 88 | }
|
89 | 89 | else
|
90 | 90 | {
|
91 |
| - define('ICONV_ENABLED', FALSE); |
| 91 | + !defined('ICONV_ENABLED') AND define('ICONV_ENABLED', FALSE); |
92 | 92 | }
|
93 | 93 | if (is_php('5.6'))
|
94 | 94 | {
|
|
169 | 169 | *
|
170 | 170 | * @return CI_Controller
|
171 | 171 | */
|
172 |
| - if (! function_exists('get_instance')) |
| 172 | + if (! function_exists('get_instance')) // check |
173 | 173 | {
|
174 | 174 | function &get_instance()
|
175 | 175 | {
|
176 | 176 | return CI_Controller::get_instance();
|
177 | 177 | }
|
178 | 178 | }
|
179 |
| - if (file_exists(APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller.php')) |
180 |
| - { |
181 |
| - require_once APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller.php'; |
182 |
| - } |
183 |
| - // Set a mark point for benchmarking |
184 |
| - $BM->mark('loading_time:_base_classes_end'); |
| 179 | + if (file_exists(APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller.php')) |
| 180 | + { |
| 181 | + require_once APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller.php'; |
| 182 | + } |
| 183 | + // Set a mark point for benchmarking |
| 184 | + $BM->mark('loading_time:_base_classes_end'); |
185 | 185 | /*
|
186 | 186 | * ------------------------------------------------------
|
187 | 187 | * Sanity checks
|
|
0 commit comments