Permalink
Browse files

[DCOM-66][PR-55] Changed obsolete function ClassLoader::fileExistsInI…

…ncludePath() to native PHP implementation stream_resolve_include_path().
  • Loading branch information...
1 parent a83d7e2 commit 82a5a2a1445b6bf7fe9cefed3f0bda636ad7b8b5 @guilhermeblanco guilhermeblanco committed Aug 28, 2011
Showing with 4 additions and 9 deletions.
  1. +4 −9 lib/Doctrine/Common/ClassLoader.php
@@ -184,7 +184,7 @@ public function canLoadClass($className)
return file_exists($this->includePath . DIRECTORY_SEPARATOR . $file);
}
- return self::fileExistsInIncludePath($file);
+ return (false !== stream_resolve_include_path($file));//self::fileExistsInIncludePath($file);
}
/**
@@ -264,13 +264,8 @@ public static function getClassLoader($className)
* @param string $file The file relative path.
* @return boolean Whether file exists in include_path.
*/
- public static function fileExistsInIncludePath($file)
+ /*public static function fileExistsInIncludePath($file)
{
- foreach (explode(PATH_SEPARATOR, get_include_path()) as $dir) {
- if (file_exists($dir . DIRECTORY_SEPARATOR . $file)) {
- return true;
- }
- }
- return false;
- }
+ return (false !== stream_resolve_include_path($file));
+ }*/
}

3 comments on commit 82a5a2a

Member

stof replied Aug 28, 2011

Why commenting the old code instead of removing it ?

@stof I fixed it as soon as I found. Here is the commit (5min later of this one) 4ff6196

Member

stof replied Aug 28, 2011

yeah, I saw it after commenting

Please sign in to comment.