diff options
| author | Remi Collet <remi@php.net> | 2017-06-26 17:22:01 +0200 |
|---|---|---|
| committer | Remi Collet <remi@php.net> | 2017-06-26 17:22:01 +0200 |
| commit | 85c32322acfc07628140bf631e7c52b12e6050b4 (patch) | |
| tree | ae79035283e68957177407123d7d342278e021d9 /Zend/zend_execute.c | |
| parent | 4ed8ff509001b35e0cb971a1d6a294345c5d7673 (diff) | |
| parent | caaeb4849aa56cbbdc66ea015c11a58bd47a43ff (diff) | |
| download | php-git-85c32322acfc07628140bf631e7c52b12e6050b4.tar.gz | |
Merge branch 'master' of git.php.net:php-src
* 'master' of git.php.net:php-src: (24 commits)
Removed EG(valid_symbol_table). Used EG(active) instead.
Release temporary string reference
Remove superfluous semicolons
Fix tests on Windows
Produce a better exception message when IntlDateFormatter constructor fails.
Fix format arguments
Remove unused variable op2. It is redeclared later.
Fix typo
Implement object type annotation
Fixed bug #73173
Expose inflate_get_status() and inflate_get_read_len() functions
Add more constants, improve comments, and add tests
Fixed bug #73900
Add OPENSSL_DONT_ZERO_PAD_KEY constant to prevent key padding
Drop soap_hash_str_find_deref()
Only compute callback name in error cases
Extract zend_get_callable_name() API
Move va_copy compatibility code into zend_portability.h
Remove unnecessary string copy
Fix FE_FETCH_* exception check
...
Diffstat (limited to 'Zend/zend_execute.c')
| -rw-r--r-- | Zend/zend_execute.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 715808632e..3159766bc5 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -648,7 +648,6 @@ static ZEND_COLD void zend_verify_type_error_common( { zend_bool is_interface = 0; *fname = ZSTR_VAL(zf->common.function_name); - if (zf->common.scope) { *fsep = "::"; *fclass = ZSTR_VAL(zf->common.scope->name); @@ -674,6 +673,10 @@ static ZEND_COLD void zend_verify_type_error_common( } } else { switch (ZEND_TYPE_CODE(arg_info->type)) { + case IS_OBJECT: + *need_msg = "be an "; + *need_kind = "object"; + break; case IS_CALLABLE: *need_msg = "be callable"; *need_kind = ""; @@ -1667,16 +1670,9 @@ fetch_from_array: zend_error(E_NOTICE, "Indirect modification of overloaded element of %s has no effect", ZSTR_VAL(ce->name)); } else if (EXPECTED(retval && Z_TYPE_P(retval) != IS_UNDEF)) { if (!Z_ISREF_P(retval)) { - if (Z_REFCOUNTED_P(retval) && - Z_REFCOUNT_P(retval) > 1) { - if (Z_TYPE_P(retval) != IS_OBJECT) { - Z_DELREF_P(retval); - ZVAL_DUP(result, retval); - retval = result; - } else { - ZVAL_COPY_VALUE(result, retval); - retval = result; - } + if (result != retval) { + ZVAL_COPY(result, retval); + retval = result; } if (Z_TYPE_P(retval) != IS_OBJECT) { zend_class_entry *ce = Z_OBJCE_P(container); |
