From: Chuck Hagenbuch Date: Sat, 17 Oct 2009 02:10:05 +0000 (-0400) Subject: Ignore '.' in the include_path for the purposes of Horde_Autoloader. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=2365a9638ddf894a6618270fd6fcf0a7f99497e6;p=horde.git Ignore '.' in the include_path for the purposes of Horde_Autoloader. --- diff --git a/framework/Autoloader/lib/Horde/Autoloader.php b/framework/Autoloader/lib/Horde/Autoloader.php index f2740943f..5cc6106c7 100644 --- a/framework/Autoloader/lib/Horde/Autoloader.php +++ b/framework/Autoloader/lib/Horde/Autoloader.php @@ -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;