Permalink
Browse files

[ClassLoader] added a check before trimming the leading \

  • Loading branch information...
kriswallsmith committed Mar 11, 2011
1 parent f6ee7c8 commit 7567a778c5c10ebbc9f121e73c6044738e272185
Showing with 3 additions and 1 deletion.
  1. +3 −1 UniversalClassLoader.php
View
@@ -182,7 +182,9 @@ public function register($prepend = false)
*/
public function loadClass($class)
{
- $class = ltrim($class, '\\');
+ if ('\\' == $class[0]) {
+ $class = substr($class, 1);
+ }
if (false !== ($pos = strrpos($class, '\\'))) {
// namespaced class name

0 comments on commit 7567a77

Please sign in to comment.