diff options
| author | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-02 11:32:48 +0100 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-01-02 11:32:48 +0100 |
| commit | 73596c56e7905ce5b7c4f15d551361ee744cad0c (patch) | |
| tree | b9fe5a103d197263963550666755831bad14cfde /Zend/tests | |
| parent | 7b3f8e746af83b044ff86c0d864801929b1dd1d9 (diff) | |
| download | php-git-73596c56e7905ce5b7c4f15d551361ee744cad0c.tar.gz | |
Partial fix for bug #75426
This does not print the exact line of the comma, but rather the line
of the previous element. This should generally be "good enough", as
the line number is close (off by one) to the actual issue now.
Previously it would point to the start of the array, which may be
very far away.
Diffstat (limited to 'Zend/tests')
| -rw-r--r-- | Zend/tests/bug75426.phpt | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Zend/tests/bug75426.phpt b/Zend/tests/bug75426.phpt new file mode 100644 index 0000000000..69e3f19239 --- /dev/null +++ b/Zend/tests/bug75426.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #75426: "Cannot use empty array elements" reports wrong position +--FILE-- +<?php +$a = [ + 1, + 2, + 3, + , + 5, + 6, +]; +?> +--EXPECTF-- +Fatal error: Cannot use empty array elements in arrays in %s on line 5 |
