From db763027bbac7029c36f9bfb2e140ca152df2f46 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 26 Mar 2015 15:33:31 +0100 Subject: [PATCH] Correctly only send the errors of the current file to the event --- lib/private/app/codechecker.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/private/app/codechecker.php b/lib/private/app/codechecker.php index dbec53579a8..f9d24be6ad1 100644 --- a/lib/private/app/codechecker.php +++ b/lib/private/app/codechecker.php @@ -103,8 +103,9 @@ class CodeChecker extends BasicEmitter { foreach ($iterator as $file) { /** @var SplFileInfo $file */ $this->emit('CodeChecker', 'analyseFileBegin', [$file->getPathname()]); - $errors = array_merge($this->analyseFile($file), $errors); - $this->emit('CodeChecker', 'analyseFileFinished', [$errors]); + $fileErrors = $this->analyseFile($file); + $this->emit('CodeChecker', 'analyseFileFinished', [$fileErrors]); + $errors = array_merge($fileErrors, $errors); } return $errors; -- 2.39.5