improved trace step skipping

This commit is contained in:
Steffen Schröder 2014-06-19 18:05:58 +02:00
parent 1b9097812e
commit b9dd9190f2

View File

@ -258,9 +258,17 @@ class ErrorHandler {
*/ */
private function shouldSkipTraceStep(array $traceStep) { private function shouldSkipTraceStep(array $traceStep) {
if (isset($traceStep['class'])) { if (isset($traceStep['class'])) {
$skippedClasses = array('Symfony', 'cURL'); $skippedClasses = array('Symfony\\Component\\EventDispatcher\\EventDispatcher', 'cURL\\Request');
foreach ($skippedClasses as $skippedClass) { foreach ($skippedClasses as $skippedClass) {
if (strpos($traceStep['class'], $skippedClass) !== false) { if ($traceStep['class'] === $skippedClass) {
return true;
}
}
}
if (isset($traceStep['file'])) {
$skippedFiles = array('Symfony', 'curl-easy');
foreach ($skippedFiles as $skippedFile) {
if (strpos($traceStep['file'], $skippedFile)) {
return true; return true;
} }
} }