Skip to content

Commit

Permalink
bug symfony#14422 Update DebugClassLoader.php (userfriendly)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.7 branch.

Discussion
----------

Update DebugClassLoader.php

Using name property of ReflectionClass instance in strncmp instead of __toString() return value, the latter seemed to breaking one of hte vendor bundles we use, and it seems fine now with the former.

Commits
-------

dcc6586 Update DebugClassLoader.php
  • Loading branch information
fabpot committed Apr 21, 2015
2 parents b66a713 + dcc6586 commit c16930f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/Debug/DebugClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public function loadClass($class)
}
$parent = $refl->getParentClass();

if (!$parent || strncmp($ns, $parent, $len)) {
if (!$parent || strncmp($ns, $parent->name, $len)) {
if ($parent && isset(self::$deprecated[$parent->name]) && strncmp($ns, $parent->name, $len)) {
trigger_error(sprintf('The %s class extends %s that is deprecated %s', $name, $parent->name, self::$deprecated[$parent->name]), E_USER_DEPRECATED);
}
Expand Down

0 comments on commit c16930f

Please sign in to comment.