mirror of
https://github.com/php/php-src.git
synced 2025-08-16 22:18:50 +02:00
Prevented modification of constant arguments
This commit is contained in:
parent
05817f1a93
commit
2d62a12128
1 changed files with 2 additions and 2 deletions
|
@ -110,10 +110,10 @@ ZEND_API zval* zend_call_method(zval *object, zend_class_entry *obj_ce, zend_fun
|
|||
}
|
||||
}
|
||||
/* copy arguments back, they might be changed by references */
|
||||
if (param_count > 0) {
|
||||
if (param_count > 0 && Z_ISREF(params[0]) && !Z_ISREF_P(arg1)) {
|
||||
ZVAL_COPY_VALUE(arg1, ¶ms[0]);
|
||||
}
|
||||
if (param_count > 1) {
|
||||
if (param_count > 1 && Z_ISREF(params[1]) && !Z_ISREF_P(arg2)) {
|
||||
ZVAL_COPY_VALUE(arg2, ¶ms[1]);
|
||||
}
|
||||
if (!retval_ptr) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue