Ignore '.' in the include_path for the purposes of Horde_Autoloader.
authorChuck Hagenbuch <chuck@horde.org>
Sat, 17 Oct 2009 02:10:05 +0000 (22:10 -0400)
committerChuck Hagenbuch <chuck@horde.org>
Sat, 17 Oct 2009 02:10:05 +0000 (22:10 -0400)
framework/Autoloader/lib/Horde/Autoloader.php

index f274094..5cc6106 100644 (file)
@@ -115,6 +115,9 @@ class Horde_Autoloader
      */
     public static function addClassPath($path, $prepend = true)
     {
+        if ($path == '.') {
+            throw new Exception('"." is not allowed in the include_path. Use an absolute path instead.');
+        }
         $path = realpath($path);
 
         if (is_null(self::$_includeCache)) {
@@ -162,6 +165,7 @@ class Horde_Autoloader
     {
         self::$_includeCache = array();
         foreach (explode(PATH_SEPARATOR, get_include_path()) as $path) {
+            if ($path == '.') { continue; }
             $path = realpath($path);
             if ($path) {
                 self::$_includeCache[] = $path;