mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed passing arguments by reference from internal functions
This commit is contained in:
parent
8863df3653
commit
d708d3c596
3 changed files with 41 additions and 12 deletions
|
@ -856,7 +856,12 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
|
|||
return FAILURE;
|
||||
}
|
||||
|
||||
zval_copy_ctor(&fci->params[i]);
|
||||
if (Z_REFCOUNTED(fci->params[i])) {
|
||||
Z_DELREF(fci->params[i]);
|
||||
}
|
||||
ZVAL_DUP(&tmp, &fci->params[i]);
|
||||
ZVAL_NEW_REF(&fci->params[i], &tmp);
|
||||
Z_ADDREF(fci->params[i]);
|
||||
} else if (!Z_ISREF(fci->params[i])) {
|
||||
if (Z_REFCOUNTED(fci->params[i])) {
|
||||
Z_ADDREF(fci->params[i]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue