]> granicus.if.org Git - php/commitdiff
MFH
authorAntony Dovgal <tony2001@php.net>
Mon, 11 Feb 2008 13:34:41 +0000 (13:34 +0000)
committerAntony Dovgal <tony2001@php.net>
Mon, 11 Feb 2008 13:34:41 +0000 (13:34 +0000)
ext/standard/array.c

index 946ad4dad3b2f2f501a583a3c178ce983ffd9728..8328a931e85bcf7661701b493a66ffb4be14c658 100644 (file)
@@ -2109,7 +2109,7 @@ PHP_FUNCTION(array_slice)
        zval     *input,                /* Input array */
                        **entry;                /* An array entry */
        long     offset,                /* Offset to get elements from */
-                        length = NULL; /* How many elements to get */
+                        length = 0;    /* How many elements to get */
        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 */
@@ -2126,7 +2126,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 is null */
-       if (length == NULL) {
+       if (length == 0) {
                length = num_in;
        }