From 373f50ad13c0d6b851b91fc078054ea6539abd3e Mon Sep 17 00:00:00 2001 From: Rob Allen Date: Sun, 3 Jul 2011 14:17:31 +0100 Subject: [PATCH] StandardAutoloader should always honour the setting of the fallbackAutoloaderFlag --- library/Zend/Loader/StandardAutoloader.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/library/Zend/Loader/StandardAutoloader.php b/library/Zend/Loader/StandardAutoloader.php index 48b0ca02b76..af77aecf09c 100644 --- a/library/Zend/Loader/StandardAutoloader.php +++ b/library/Zend/Loader/StandardAutoloader.php @@ -223,7 +223,7 @@ public function autoload($class) if (false !== strpos($class, self::NS_SEPARATOR)) { if ($this->loadClass($class, self::LOAD_NS)) { return $class; - } elseif ($this->isFallbackAutoloader()) { + } elseif ($isFallback) { return $this->loadClass($class, self::ACT_AS_FALLBACK); } return false; @@ -231,12 +231,14 @@ public function autoload($class) if (false !== strpos($class, self::PREFIX_SEPARATOR)) { if ($this->loadClass($class, self::LOAD_PREFIX)) { return $class; - } elseif ($this->isFallbackAutoloader()) { + } elseif ($isFallback) { return $this->loadClass($class, self::ACT_AS_FALLBACK); } return false; } - return $this->loadClass($class, self::ACT_AS_FALLBACK); + if ($isFallback) { + return $this->loadClass($class, self::ACT_AS_FALLBACK); + } return false; }