Skip to content

Commit

Permalink
Merge pull request #142 from rezzza/fix_autoload
Browse files Browse the repository at this point in the history
Alias on a real class must be done only if the autoloader has loaded the real class, thanks to @stephpy for its help.
  • Loading branch information
mageekguy committed Nov 14, 2012
2 parents 989a528 + d8f803e commit 81f4338
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/autoloader.php
Expand Up @@ -110,7 +110,7 @@ public function requireClass($class)
require $path;
}

if ($realClass != $class)
if (class_exists($realClass, false) === true && $realClass != $class)
{
class_alias($realClass, $class);
}
Expand Down

0 comments on commit 81f4338

Please sign in to comment.