Skip to content


system/core/Loader.php, possibly missed parameter in recursive method call? #1463

desertwaste opened this Issue · 1 comment

2 participants


i was not sure whether to post this or not, but while i was wandering around in the CI 2.1.0 code, i stumbled on the library method of Loader core system class.

the library method of system/core/Loader.php is defined as :
public function library($library = '', $params = NULL, $object_name = NULL)

later on, at line 200 i found this recursive method call :
foreach ($library as $class)
$this->library($class, $params);

so, it seems that the optional third parameter $object_name is not included in subsequent recursive method calls.

as i am not familiar with the code in such detail to decide if this is intentional or not, i want to point your attention at what i have found out.

Svetlin Stefanov


This is by design, so that it can handle an array in $autoload['libraries']. Plus, you can't give all of the libraries the same object/property name.

@narfbg narfbg closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.