From c84e52b998fd610f88441d5e23a5a4658d03e080 Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Fri, 1 Apr 2011 00:14:42 +0000 Subject: [PATCH] Load method was not reading the shared parameter properly. --- flight/Flight.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/flight/Flight.php b/flight/Flight.php index 3ee6c62..8c4e36f 100644 --- a/flight/Flight.php +++ b/flight/Flight.php @@ -1,6 +1,6 @@ * @license http://www.opensource.org/licenses/mit-license.php @@ -68,7 +68,7 @@ class Flight { } // Otherwise try to autoload class - return self::load($name, (bool)$params[0]); + return self::load($name, (!empty($params)) ? (bool)$params[0] : true); } /** @@ -118,7 +118,9 @@ class Flight { return $obj; } - return self::getInstance(ucfirst($name)); + return ($shared) ? + self::getInstance(ucfirst($name)) : + self::getClass(ucfirst($name)); } /**