From 220e30e5198df6d8591560d22d81d01518f063d9 Mon Sep 17 00:00:00 2001 From: jwage Date: Tue, 17 Nov 2009 03:38:35 +0000 Subject: [PATCH] [2.0] Fixing the IsolatedClassLoader to work with null ns --- lib/Doctrine/Common/IsolatedClassLoader.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/Doctrine/Common/IsolatedClassLoader.php b/lib/Doctrine/Common/IsolatedClassLoader.php index 519a64d02..610489147 100644 --- a/lib/Doctrine/Common/IsolatedClassLoader.php +++ b/lib/Doctrine/Common/IsolatedClassLoader.php @@ -45,7 +45,7 @@ class IsolatedClassLoader * * @param string $ns The namespace to use. */ - public function __construct($ns) + public function __construct($ns = null) { $this->_namespace = $ns; } @@ -96,11 +96,7 @@ class IsolatedClassLoader */ public function loadClass($className) { - /*if (class_exists($className, false) || interface_exists($className, false)) { - return false; - }*/ - - if (strpos($className, $this->_namespace.$this->_namespaceSeparator) !== 0) { + if ($this->_namespace && strpos($className, $this->_namespace.$this->_namespaceSeparator) !== 0) { return false; }