File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
tests/classes/inner_classes Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1054,7 +1054,7 @@ static zend_always_inline bool zend_check_class_visibility(const zend_class_entr
10541054 // a protected class is visible if it is a subclass of the lexical scope and the current visibility is protected or private
10551055 if (!ce -> required_scope_absolute ) {
10561056 if (current_visibility & ZEND_ACC_PUBLIC ) {
1057- zend_type_error ("Cannot assign private %s to higher visibile property %s::%s" ,
1057+ zend_type_error ("Cannot assign protected %s to higher visibile property %s::%s" ,
10581058 ZSTR_VAL (ce -> name ),
10591059 ZSTR_VAL (info -> ce -> name ),
10601060 zend_get_unmangled_property_name (info -> name ));
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ $x->test();
1818var_dump ($ x );
1919?>
2020--EXPECTF--
21- Fatal error: Uncaught TypeError: Cannot assign private Outer:>Inner to higher visibile property Outer::illegal in %s:%d
21+ Fatal error: Uncaught TypeError: Cannot assign protected Outer:>Inner to higher visibile property Outer::illegal in %s:%d
2222Stack trace:
2323#0 %s(%d): Outer->test()
2424#1 {main}
You can’t perform that action at this time.
0 commit comments