From 2365a9638ddf894a6618270fd6fcf0a7f99497e6 Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Fri, 16 Oct 2009 22:10:05 -0400 Subject: [PATCH] Ignore '.' in the include_path for the purposes of Horde_Autoloader. --- framework/Autoloader/lib/Horde/Autoloader.php | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.11.0