@@ -1948,7 +1948,7 @@ PHP_FUNCTION(array_unshift)
1948
1948
PHP_FUNCTION (array_splice )
1949
1949
{
1950
1950
zval * array , /* Input array */
1951
- * repl_array = NULL , /* Replacement array */
1951
+ * * repl_array = NULL , /* Replacement array */
1952
1952
* * * repl = NULL ; /* Replacement elements */
1953
1953
HashTable * rem_hash = NULL ; /* Removed elements' hash */
1954
1954
Bucket * p ; /* Bucket used for traversing hash */
@@ -1958,7 +1958,7 @@ PHP_FUNCTION(array_splice)
1958
1958
repl_num = 0 ; /* Number of replacement elements */
1959
1959
int num_in ; /* Number of elements in the input array */
1960
1960
1961
- if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "al|lz/ " , & array , & offset , & length , & repl_array ) == FAILURE ) {
1961
+ if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "al|lZ " , & array , & offset , & length , & repl_array ) == FAILURE ) {
1962
1962
return ;
1963
1963
}
1964
1964
@@ -1970,12 +1970,12 @@ PHP_FUNCTION(array_splice)
1970
1970
1971
1971
if (repl_array ) {
1972
1972
/* Make sure the last argument, if passed, is an array */
1973
- convert_to_array (repl_array );
1973
+ convert_to_array_ex (repl_array );
1974
1974
1975
1975
/* Create the array of replacement elements */
1976
- repl_num = zend_hash_num_elements (Z_ARRVAL_P (repl_array ));
1976
+ repl_num = zend_hash_num_elements (Z_ARRVAL_PP (repl_array ));
1977
1977
repl = (zval * * * )safe_emalloc (repl_num , sizeof (zval * * ), 0 );
1978
- for (p = Z_ARRVAL_P (repl_array )-> pListHead , i = 0 ; p ; p = p -> pListNext , i ++ ) {
1978
+ for (p = Z_ARRVAL_PP (repl_array )-> pListHead , i = 0 ; p ; p = p -> pListNext , i ++ ) {
1979
1979
repl [i ] = ((zval * * )p -> pData );
1980
1980
}
1981
1981
}
0 commit comments