From 5a076e670a13decf76524e6f0c13abfce5532021 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 10 Oct 2019 15:14:04 +0200 Subject: 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. --- tests/classes/static_properties_003_error4.phpt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'tests') 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== -- cgit v1.2.1