From c751a5ac77876181a4919d2b20a13dd8a84be471 Mon Sep 17 00:00:00 2001 From: Lucas Heuvelmann Date: Thu, 16 Feb 2012 23:35:02 +0100 Subject: [PATCH] php: fix output of lint if display_errors is off display_errors might be turned of for php globally. In this case the output of php -l does not contain the errors messages. Using this option will turn the option on for the single call. --- syntax_checkers/php.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntax_checkers/php.vim b/syntax_checkers/php.vim index 4f22f910..cbe189ee 100644 --- a/syntax_checkers/php.vim +++ b/syntax_checkers/php.vim @@ -38,7 +38,7 @@ function! SyntaxCheckers_php_GetLocList() let errors = [] - let makeprg = "php -l ".shellescape(expand('%')) + let makeprg = "php -l -d display_errors=1 ".shellescape(expand('%')) let errorformat='%-GNo syntax errors detected in%.%#,PHP Parse error: %#syntax %trror\, %m in %f on line %l,PHP Fatal %trror: %m in %f on line %l,%-GErrors parsing %.%#,%-G\s%#,Parse error: %#syntax %trror\, %m in %f on line %l,Fatal %trror: %m in %f on line %l' let errors = SyntasticMake({ 'makeprg': makeprg, 'errorformat': errorformat })