[Debug] fixed typo that prevented smart errors for class not found errors to work

This commit is contained in:
Fabien Potencier 2013-08-30 09:34:07 +02:00
parent feff411dfc
commit f3e5994212

View File

@ -30,7 +30,7 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface
public function handleError(array $error, FatalErrorException $exception)
{
$messageLen = strlen($error['message']);
$notFoundSuffix = '" not found';
$notFoundSuffix = '\' not found';
$notFoundSuffixLen = strlen($notFoundSuffix);
if ($notFoundSuffixLen > $messageLen) {
return;
@ -41,7 +41,7 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface
}
foreach (array('class', 'interface', 'trait') as $typeName) {
$prefix = ucfirst($typeName).' "';
$prefix = ucfirst($typeName).' \'';
$prefixLen = strlen($prefix);
if (0 !== strpos($error['message'], $prefix)) {
continue;