From: Matt Wilmas Date: Mon, 2 Jun 2008 11:20:17 +0000 (+0000) Subject: Initialize with length instead of 0 (and thanks Antony for finding) X-Git-Tag: BEFORE_HEAD_NS_CHANGE~1609 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0cc9f0121221217cadeadf9eb2b4e258bef8b7e2;p=php Initialize with length instead of 0 (and thanks Antony for finding) --- 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) {