From 572adc05e40a139b36fd92e3f8342a56e7a220f9 Mon Sep 17 00:00:00 2001 From: Matt Wilmas Date: Mon, 2 Jun 2008 11:20:59 +0000 Subject: [PATCH] MFH: Initialize with length instead of 0 --- 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 8e0024eae49..3e69d9573ad 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -2111,7 +2111,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) {