diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-10-10 15:14:04 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-10-10 15:14:04 +0200 |
commit | 5a076e670a13decf76524e6f0c13abfce5532021 (patch) | |
tree | c5b713ea38e08e85853c3c3c9b52d89c06bc4dd6 /tests | |
parent | 4463acb9513dfb62206760c49b3da1fe4d92f40a (diff) | |
download | php-git-5a076e670a13decf76524e6f0c13abfce5532021.tar.gz |
Return error_zval form get_property_ptr_ptr on exception
This goes in the reverse direction of 4463acb9513dfb62206760c49b3da1fe4d92f40a.
After looking around a bit, it seems that we already check for
Z_ISERROR_P() on the get_property_ptr_ptr return value in other places.
So do this in zend_fetch_property_address() as well, and also make
sure that EG(error_zval) is indeed returned on exception in
get_property_ptr_ptr.
In particular, this fixes the duplicate exceptions that we used to
get because first get_property_ptr_ptr threw one and then
read_property throws the same exception again.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/classes/static_properties_003_error4.phpt | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/classes/static_properties_003_error4.phpt b/tests/classes/static_properties_003_error4.phpt index 7c54fc42ad..a96ffb2977 100644 --- a/tests/classes/static_properties_003_error4.phpt +++ b/tests/classes/static_properties_003_error4.phpt @@ -17,11 +17,7 @@ try { ==Done== --EXPECTF-- --> Access non-visible static prop like instance prop: -Error: Cannot access protected property C::$y in %s:9 -Stack trace: -#0 {main} - -Next Error: Cannot access protected property C::$y in %s:9 +Error: Cannot access protected property C::$y in %s:%d Stack trace: #0 {main} ==Done== |