diff options
| author | Antony Dovgal <tony2001@php.net> | 2007-07-13 08:50:53 +0000 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2007-07-13 08:50:53 +0000 |
| commit | 1d0a4b2fe74eb46fe7cb08361432b9d3e64f08f1 (patch) | |
| tree | 415b5bf523134a73fb96bf2a041afbe0e1964aea /ext | |
| parent | 26dcf2f57f82a289adfff7ed77bbb93ddfef57f6 (diff) | |
| download | php-git-1d0a4b2fe74eb46fe7cb08361432b9d3e64f08f1.tar.gz | |
simplify the patch and prevent NULL retval_ptr_ptr's
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/standard/basic_functions.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index d90cba2479..5b5413761f 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -5042,10 +5042,8 @@ PHP_FUNCTION(call_user_func) fci.retval_ptr_ptr = &retval_ptr; - if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS) { - *return_value = **fci.retval_ptr_ptr; - zval_copy_ctor(return_value); - zval_ptr_dtor(fci.retval_ptr_ptr); + if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && fci.retval_ptr_ptr && *fci.retval_ptr_ptr) { + COPY_PZVAL_TO_ZVAL(*return_value, *fci.retval_ptr_ptr); } if (fci.params) { @@ -5069,10 +5067,8 @@ PHP_FUNCTION(call_user_func_array) zend_fcall_info_args(&fci, params TSRMLS_CC); fci.retval_ptr_ptr = &retval_ptr; - if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS) { - *return_value = **fci.retval_ptr_ptr; - zval_copy_ctor(return_value); - zval_ptr_dtor(fci.retval_ptr_ptr); + if (zend_call_function(&fci, &fci_cache TSRMLS_CC) == SUCCESS && fci.retval_ptr_ptr && *fci.retval_ptr_ptr) { + COPY_PZVAL_TO_ZVAL(*return_value, *fci.retval_ptr_ptr); } zend_fcall_info_args_clear(&fci, 1); |
