diff options
Diffstat (limited to 'ale_linters/php/php.vim')
-rw-r--r-- | ale_linters/php/php.vim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ale_linters/php/php.vim b/ale_linters/php/php.vim index 1127b94a..d95e28a8 100644 --- a/ale_linters/php/php.vim +++ b/ale_linters/php/php.vim @@ -5,7 +5,7 @@ function! ale_linters#php#php#Handle(buffer, lines) abort " Matches patterns like the following: " " PHP Parse error: syntax error, unexpected ';', expecting ']' in - on line 15 - let l:pattern = ':\s\+\(.\+unexpected ''\(.\{-}\)''.*\) in - on line \(\d\+\)' + let l:pattern = 'Parse error:\s\+\(.\{-}unexpected ''\(.\{-}\)''.\{-}\|.*\) in - on line \(\d\+\)' let l:output = [] @@ -21,7 +21,7 @@ function! ale_linters#php#php#Handle(buffer, lines) abort \ 'bufnr': a:buffer, \ 'lnum': l:match[3] + 0, \ 'vcol': 0, - \ 'col': match(getline(l:match[3]), l:match[2]) + 1, + \ 'col': empty(l:match[2]) ? 0 : stridx(getline(l:match[3]), l:match[2]) + 1, \ 'text': l:match[1], \ 'type': 'E', \ 'nr': -1, |