Browse Source

fix segfault when retval_ptr is empty - such as when exception thrown

PHP-5.1
Rob Richards 22 years ago
parent
commit
bb9ba8e36e
  1. 4
      ext/standard/array.c

4
ext/standard/array.c

@ -1084,7 +1084,9 @@ static int php_array_walk(HashTable *target_hash, zval **userdata, int recursive
/* Call the userland function */
if (zend_call_function(&fci, &BG(array_walk_fci_cache) TSRMLS_CC) == SUCCESS) {
zval_ptr_dtor(&retval_ptr);
if (retval_ptr) {
zval_ptr_dtor(&retval_ptr);
}
} else {
char *func_name;

Loading…
Cancel
Save