From fc5be6928fc2af13333569e766a289e5e3334233 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Wed, 23 Feb 2011 22:52:41 -0500 Subject: [PATCH] [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 --- phpBB/includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 471d3476a0..e0623c0869 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3931,7 +3931,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline) function phpbb_error_collection_handler($errno, $msg_text, $errfile, $errline) { 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()