From 9e84d2e69d13b13962df6d9caa83d081f3684461 Mon Sep 17 00:00:00 2001 From: Gerard Roche Date: Wed, 20 Sep 2017 12:00:56 +0100 Subject: [PATCH] Fix #29 Errors not showing up with PHP 7.2 Tested against 7.2.0RC2 --- linter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linter.py b/linter.py index b459ec2..45951f4 100644 --- a/linter.py +++ b/linter.py @@ -19,7 +19,7 @@ class PHP(Linter): syntax = ('php', 'html') regex = ( r'^(?:Parse|Fatal) (?Perror):(\s*(?Pparse|syntax) error,?)?\s*' - r'(?P(?:unexpected \'(?P[^\']+)\')?.*) in - on line (?P\d+)' + r'(?P(?:unexpected \'(?P[^\']+)\')?.*) (?:in - )?on line (?P\d+)' ) executable = 'php' error_stream = util.STREAM_STDOUT