mirror of
https://github.com/php/php-src.git
synced 2024-11-27 11:53:33 +08:00
73596c56e7
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.
16 lines
230 B
PHP
16 lines
230 B
PHP
--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
|