Skip to content

Commit

Permalink
Use strstr instead of strpos
Browse files Browse the repository at this point in the history
  • Loading branch information
larowlan authored and fabpot committed Aug 9, 2013
1 parent 1a73b44 commit 2769c9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/ClassLoader/ClassLoader.php
Expand Up @@ -181,7 +181,7 @@ public function findFile($class)
$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;
Expand Down

0 comments on commit 2769c9d

Please sign in to comment.