Merge pull request #1964 from Razican/log_fix
Fixed typo in logs
diff --git a/system/core/Controller.php b/system/core/Controller.php
index cbdf051..ee6fec8 100644
--- a/system/core/Controller.php
+++ b/system/core/Controller.php
@@ -65,6 +65,7 @@
}
$this->load =& load_class('Loader', 'core');
+ $this->load->initialize();
log_message('debug', 'Controller Class Initialized');
}
diff --git a/system/core/Loader.php b/system/core/Loader.php
index 2a78f41..88fbdb6 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -130,10 +130,8 @@
/**
* Class constructor
*
- * Sets component load paths, gets the initial output buffering level
- * and calls the autoloader.
+ * Sets component load paths, gets the initial output buffering level.
*
- * @uses CI_Loader::_ci_autoloader()
* @return void
*/
public function __construct()
@@ -143,8 +141,6 @@
$this->_ci_helper_paths = array(APPPATH, BASEPATH);
$this->_ci_model_paths = array(APPPATH);
$this->_ci_view_paths = array(VIEWPATH => TRUE);
- $this->_base_classes =& is_loaded();
- $this->_ci_autoloader();
log_message('debug', 'Loader Class Initialized');
}
@@ -152,6 +148,23 @@
// --------------------------------------------------------------------
/**
+ * Initializer
+ *
+ * @todo Figure out a way to move this to the constructor
+ * without breaking *package_path*() methods.
+ * @uses CI_Loader::_ci_autoloader()
+ * @used-by CI_Controller::__construct()
+ * @return void
+ */
+ public function initialize()
+ {
+ $this->_base_classes =& is_loaded();
+ $this->_ci_autoloader();
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Is Loaded
*
* A utility method to test if a class is in the self::$_ci_classes array.
@@ -1134,7 +1147,7 @@
*
* Loads component listed in the config/autoload.php file.
*
- * @used-by CI_Loader::__construct()
+ * @used-by CI_Loader::initialize()
* @return void
*/
protected function _ci_autoloader()
diff --git a/tests/codeigniter/core/Loader_test.php b/tests/codeigniter/core/Loader_test.php
index be223f9..ecc5ca9 100644
--- a/tests/codeigniter/core/Loader_test.php
+++ b/tests/codeigniter/core/Loader_test.php
@@ -493,7 +493,7 @@
);
$this->ci_vfs_create('autoload', '<?php $autoload = '.var_export($cfg, TRUE).';', $this->ci_app_root, 'config');
- $this->load->__construct();
+ $this->load->initialize();
// Verify path
$this->assertContains($path, $this->load->get_package_paths());
diff --git a/tests/mocks/ci_testcase.php b/tests/mocks/ci_testcase.php
index 2d0a268..f164929 100644
--- a/tests/mocks/ci_testcase.php
+++ b/tests/mocks/ci_testcase.php
@@ -39,8 +39,6 @@
$this->ci_app_root = vfsStream::newDirectory('application')->at($this->ci_vfs_root);
$this->ci_base_root = vfsStream::newDirectory('system')->at($this->ci_vfs_root);
$this->ci_view_root = vfsStream::newDirectory('views')->at($this->ci_app_root);
- vfsStream::newDirectory('config')->at($this->ci_app_root);
- $this->ci_vfs_clone('application/config/autoload.php');
if (method_exists($this, 'set_up'))
{
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index abb75f5..cbc6295 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -182,7 +182,7 @@
- Added method ``remove()`` to remove a cart item, updating with quantity of 0 seemed like a hack but has remained to retain compatibility.
- Added method ``get_item()`` to enable retrieving data for a single cart item.
- :doc:`Image Manipulation library <libraries/image_lib>` changes include:
- - The initialize() method now only sets existing class properties.
+ - The ``initialize()`` method now only sets existing class properties.
- Added support for 3-length hex color values for *wm_font_color* and *wm_shadow_color* properties, as well as validation for them.
- Class properties *wm_font_color*, *wm_shadow_color* and *wm_use_drop_shadow* are now protected, to avoid breaking the ``text_watermark()`` method if they are set manually after initialization.
- If property *maintain_ratio* is set to TRUE, ``image_reproportion()`` now doesn't need both width and height to be specified.
@@ -245,7 +245,6 @@
- ``library()`` method will now load drivers as well, for backward compatibility of converted libraries (like :doc:`Session <libraries/sessions>`).
- ``$config['rewrite_short_tags']`` now has no effect when using PHP 5.4 as ``<?=`` will always be available.
- Changed method ``config()`` to return whatever ``CI_Config::load()`` returns instead of always being void.
- - Removed method ``initialize()`` and moved its logic to the constructor.
- :doc:`Input Library <libraries/input>` changes include:
- Added ``method()`` to retrieve ``$_SERVER['REQUEST_METHOD']``.
- Added support for arrays and network addresses (e.g. 192.168.1.1/24) for use with the *proxy_ips* setting.