projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
170b2a0
)
Ignore '.' in the include_path for the purposes of Horde_Autoloader.
author
Chuck Hagenbuch
<chuck@horde.org>
Sat, 17 Oct 2009 02:10:05 +0000
(22:10 -0400)
committer
Chuck Hagenbuch
<chuck@horde.org>
Sat, 17 Oct 2009 02:10:05 +0000
(22:10 -0400)
framework/Autoloader/lib/Horde/Autoloader.php
patch
|
blob
|
history
diff --git
a/framework/Autoloader/lib/Horde/Autoloader.php
b/framework/Autoloader/lib/Horde/Autoloader.php
index
f274094
..
5cc6106
100644
(file)
--- 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;