Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

skip namespaced classes for special cases

  • Loading branch information...
commit b36ec24741516c373cc72f180fd5e0c6a9cf0b6b 1 parent deb671d
Brennen Bearnes authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 Autoloader.php
View
4 Autoloader.php
@@ -87,7 +87,9 @@ public static function load ($class)
else {
// TODO: All these strpos() calls are probably expensive.
foreach (static::$searchPaths as $substr => $dir) {
- if (false !== strpos($class, $substr)) {
+ // we first check for a \, which indicates a namespace
+ // - those we want to skip
+ if ((false === strpos($class, '\\')) && (false !== strpos($class, $substr))) {
$path = $dir . $class . '.php';
break;
}
Please sign in to comment.
Something went wrong with that request. Please try again.