Allow replacement to be empty or null again.
authorJan Schneider <jan@horde.org>
Sun, 3 May 2009 14:03:24 +0000 (16:03 +0200)
committerJan Schneider <jan@horde.org>
Sun, 3 May 2009 22:38:12 +0000 (00:38 +0200)
framework/Autoloader/lib/Horde/Autoloader.php

index 887b94c..955a8d9 100644 (file)
@@ -97,7 +97,10 @@ class Horde_Autoloader
      */
     public static function addClassPattern($pattern, $replace = null)
     {
-        self::$_classPatterns[] = array($pattern, rtrim($replace, '/') . '/');
+        if (strlen($replace)) {
+            $replace = rtrim($replace, '/') . '/';
+        }
+        self::$_classPatterns[] = array($pattern, $replace);
     }
 
 }