Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f3e5994

Browse files
committed
[Debug] fixed typo that prevented smart errors for class not found errors to work
1 parent feff411 commit f3e5994

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface
3030
public function handleError(array $error, FatalErrorException $exception)
3131
{
3232
$messageLen = strlen($error['message']);
33-
$notFoundSuffix = '" not found';
33+
$notFoundSuffix = '\' not found';
3434
$notFoundSuffixLen = strlen($notFoundSuffix);
3535
if ($notFoundSuffixLen > $messageLen) {
3636
return;
@@ -41,7 +41,7 @@ public function handleError(array $error, FatalErrorException $exception)
4141
}
4242

4343
foreach (array('class', 'interface', 'trait') as $typeName) {
44-
$prefix = ucfirst($typeName).' "';
44+
$prefix = ucfirst($typeName).' \'';
4545
$prefixLen = strlen($prefix);
4646
if (0 !== strpos($error['message'], $prefix)) {
4747
continue;

0 commit comments

Comments
 (0)