]> granicus.if.org Git - php/commitdiff
fix interruption problem with array_pad
authorStanislav Malyshev <stas@php.net>
Thu, 24 Dec 2009 00:27:11 +0000 (00:27 +0000)
committerStanislav Malyshev <stas@php.net>
Thu, 24 Dec 2009 00:27:11 +0000 (00:27 +0000)
ext/standard/array.c

index e89833da5f0dc982fb40c27918d3a90757c5c497..0ffc40a2b8642f964c60715d04eedf4617a0b1d1 100644 (file)
@@ -2749,12 +2749,12 @@ PHP_FUNCTION(array_pad)
                WRONG_PARAM_COUNT;
        }
        
+       convert_to_long_ex(pad_size);
        /* Make sure arguments are of the proper type */
        if (Z_TYPE_PP(input) != IS_ARRAY) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "The argument should be an array");
                return;
        }
-       convert_to_long_ex(pad_size);
        
        /* Do some initial calculations */
        input_size = zend_hash_num_elements(Z_ARRVAL_PP(input));