From 0cc9f0121221217cadeadf9eb2b4e258bef8b7e2 Mon Sep 17 00:00:00 2001 From: Matt Wilmas Date: Mon, 2 Jun 2008 11:20:17 +0000 Subject: [PATCH] Initialize with length instead of 0 (and thanks Antony for finding) --- ext/standard/array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/standard/array.c b/ext/standard/array.c index f05d734f57..ccfd772c2a 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -2298,7 +2298,7 @@ PHP_FUNCTION(array_splice) /* Don't create the array of removed elements if it's not going * to be used; e.g. only removing and/or replacing elements */ if (return_value_used) { - int size = 0; + int size = length; /* Clamp the offset.. */ if (offset > num_in) { -- 2.50.1