Permalink
Browse files

php: prevent error duplication

Turn off `display_errors` and empty the `error_log` option so that
errors are guaranteed to be output to stdout

See #186 for discussion.
  • Loading branch information...
1 parent de9f81b commit 1f91303cdc3be44112a9b3734241a7b36173f44b @scrooloose scrooloose committed Mar 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 syntax_checkers/php.vim
View
@@ -38,7 +38,7 @@ function! SyntaxCheckers_php_GetLocList()
let errors = []
- let makeprg = "php -l -d error_reporting=E_PARSE -d display_errors=1 ".shellescape(expand('%'))
+ let makeprg = "php -l -d error_reporting=E_PARSE -d display_errors=0 -d error_log='' ".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 })

2 comments on commit 1f91303

Just a note that this broke syntastic on my windows install. Seemed to need display_errors to be 1!

Added notes to issue #206.

Please sign in to comment.