]> granicus.if.org Git - php/commitdiff
Use "modify" error message for FUNC_ARG fetch as well
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 20 Feb 2019 10:53:31 +0000 (11:53 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 20 Feb 2019 10:54:22 +0000 (11:54 +0100)
Avoid differences based on whether a W or FUNC_ARG fetch is performed.

Zend/zend_execute.c

index 7d2e4426c5da9019320355222644581564b76128..70669e5fd16ca9481c6e1f5c52f2ab10a321c21d 100644 (file)
@@ -711,6 +711,7 @@ static zend_never_inline ZEND_COLD zval* ZEND_FASTCALL make_real_object(zval *ob
                                zend_error(E_WARNING, "Attempt to increment/decrement property '%s' of non-object", ZSTR_VAL(property_name));
                        } else if (opline->opcode == ZEND_FETCH_OBJ_W
                                        || opline->opcode == ZEND_FETCH_OBJ_RW
+                                       || opline->opcode == ZEND_FETCH_OBJ_FUNC_ARG
                                        || opline->opcode == ZEND_ASSIGN_OBJ_REF) {
                                zend_error(E_WARNING, "Attempt to modify property '%s' of non-object", ZSTR_VAL(property_name));
                        } else {