From 2e5872ac0527c342e066bdc2e8facf452858dd39 Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 6 Sep 2006 02:32:55 +0000 Subject: --- system/libraries/Loader.php | 25 +++---------------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/system/libraries/Loader.php b/system/libraries/Loader.php index e2467fa64..a140fb5a2 100644 --- a/system/libraries/Loader.php +++ b/system/libraries/Loader.php @@ -565,15 +565,7 @@ class CI_Loader { { if (isset($autoload[$type])) { - if ( ! is_array($autoload[$type])) - { - $autoload[$type] = array($autoload[$type]); - } - - foreach ($autoload[$type] as $item) - { - $this->$type($item); - } + $this->$type($autoload[$type]); } } } @@ -592,20 +584,9 @@ class CI_Loader { */ function _ci_object_to_array($object) { - if ( ! is_object($object)) - { - return $object; - } - - $array = array(); - foreach (get_object_vars($object) as $key => $val) - { - $array[$key] = $val; - } - - return $array; + return (is_object($object)) ? get_object_vars($object) : $object; } + // END _ci_object_to_array() } -// END Loader Class ?> \ No newline at end of file -- cgit v1.2.3-24-g4f1b