Use strstr instead of strpos

This commit is contained in:
Lee Rowlands 2013-05-18 07:58:23 +10:00 committed by Fabien Potencier
parent 1a73b44df0
commit 2769c9dbb1
1 changed files with 1 additions and 1 deletions

View File

@ -181,7 +181,7 @@ class ClassLoader
$classPath .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
foreach ($this->prefixes as $prefix => $dirs) {
if (0 === strpos($class, $prefix)) {
if ($class === strstr($class, $prefix)) {
foreach ($dirs as $dir) {
if (file_exists($dir . DIRECTORY_SEPARATOR . $classPath)) {
return $dir . DIRECTORY_SEPARATOR . $classPath;