From: Antony Dovgal Date: Mon, 11 Feb 2008 13:34:26 +0000 (+0000) Subject: this is integer, not pointer X-Git-Tag: RELEASE_2_0_0a1~535 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1d540b42559d49e4b1a4a0c9ada1ec532982242a;p=php this is integer, not pointer --- diff --git a/ext/standard/array.c b/ext/standard/array.c index 9b8b9833fb..abea380702 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -2296,7 +2296,7 @@ PHP_FUNCTION(array_slice) zval *input, /* Input array */ **entry; /* An array entry */ long offset, /* Offset to get elements from */ - length = NULL; + length = 0; zend_bool preserve_keys = 0; /* Whether to preserve keys while copying to the new array or not */ int num_in, /* Number of elements in the input array */ pos; /* Current position in the array */ @@ -2313,7 +2313,7 @@ PHP_FUNCTION(array_slice) num_in = zend_hash_num_elements(Z_ARRVAL_P(input)); /* We want all entries from offset to the end if length is not passed or length is null */ - if (length == NULL) { + if (length == 0) { length = num_in; }