File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6725,8 +6725,9 @@ ZEND_METHOD(ReflectionProperty, isReadable)
67256725 if (ce -> __get ) {
67266726 if (obj && ce -> __isset ) {
67276727 if (ce -> __isset -> common .fn_flags & ZEND_ACC_RETURN_REFERENCE ) {
6728- zend_throw_exception (reflection_exception_ptr , "__isset should not return a reference" , 0 );
6729- RETURN_THROWS ();
6728+ //php_error_docref(NULL, E_WARNING, "__isset unexpectedly returned a reference!");
6729+ zend_error (E_WARNING , "__isset unexpectedly returned a reference!" );
6730+ RETURN_FALSE ;
67306731 }
67316732
67326733 uint32_t * guard = zend_get_property_guard (obj , ref -> unmangled_name );
Original file line number Diff line number Diff line change @@ -21,19 +21,21 @@ class TestClass {
2121
2222
2323function test ($ class ) {
24- try {
25- $ rc = new ReflectionClass ($ class );
26- foreach ($ rc ->getProperties () as $ rp ) {
27- echo $ rp ->getName () . ' from global: ' ;
28- var_dump ($ rp ->isReadable (null , new $ class ));
29- }
30- } catch (\Exception $ ex ) {
31- echo $ ex ->getMessage ();
24+ $ rc = new ReflectionClass ($ class );
25+ foreach ($ rc ->getProperties () as $ rp ) {
26+ echo $ rp ->getName () . ' from global: ' ;
27+ var_dump ($ rp ->isReadable (null , new $ class ));
3228 }
3329}
3430
3531test ('TestClass ' );
3632?>
3733--EXPECTF--
38- a from global: bool(false)
39- b from global: __isset should not return a reference
34+ a from global:bool(false)
35+ b from global:
36+ Warning: __isset unexpectedly returned a reference! in %s/ext/reflection/tests/gh22000.php on line %d
37+ bool(false)
38+ c from global:
39+ Warning: __isset unexpectedly returned a reference! in %s/ext/reflection/tests/gh22000.php on line %d
40+ bool(false)
41+
You can’t perform that action at this time.
0 commit comments