From 946b5b1cdba4cc86b5f4ddc7082f7a7a782f491b Mon Sep 17 00:00:00 2001 From: Sara Itani Date: Fri, 24 Mar 2017 10:31:23 -0700 Subject: [PATCH] Fix exception during diagnostics parsing --- src/TolerantTreeAnalyzer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TolerantTreeAnalyzer.php b/src/TolerantTreeAnalyzer.php index c172286..4e6b994 100644 --- a/src/TolerantTreeAnalyzer.php +++ b/src/TolerantTreeAnalyzer.php @@ -103,8 +103,8 @@ class TolerantTreeAnalyzer implements TreeAnalyzerInterface { } } + $this->diagnostics = []; foreach (Tolerant\DiagnosticsProvider::getDiagnostics($this->stmts) as $_error) { - $this->diagnostics = []; $range = Tolerant\PositionUtilities::getRangeFromPosition($_error->start, $_error->length, $content); $this->diagnostics[] = new Diagnostic(