[ticket/10057] No negative array indexing.

PHP manual does not say that negative array indices are allowed,
so it's best to assume they are not guaranteed to work the way
one would expect.

PHPBB3-10057
This commit is contained in:
Oleg Pudeyev 2011-02-23 22:52:41 -05:00
parent d69a7c620a
commit fc5be6928f

View file

@ -3931,7 +3931,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
function phpbb_error_collection_handler($errno, $msg_text, $errfile, $errline) function phpbb_error_collection_handler($errno, $msg_text, $errfile, $errline)
{ {
global $phpbb_collected_errors; global $phpbb_collected_errors;
$phpbb_collected_errors[-1][] = array($errno, $msg_text, $errfile, $errline); $phpbb_collected_errors[count($phpbb_collected_errors)-1][] = array($errno, $msg_text, $errfile, $errline);
} }
function phpbb_start_error_collection() function phpbb_start_error_collection()