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
1054
1054
// a protected class is visible if it is a subclass of the lexical scope and the current visibility is protected or private
1055
1055
if (!ce -> required_scope_absolute ) {
1056
1056
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" ,
1058
1058
ZSTR_VAL (ce -> name ),
1059
1059
ZSTR_VAL (info -> ce -> name ),
1060
1060
zend_get_unmangled_property_name (info -> name ));
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ $x->test();
18
18
var_dump ($ x );
19
19
?>
20
20
--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
22
22
Stack trace:
23
23
#0 %s(%d): Outer->test()
24
24
#1 {main}
You can’t perform that action at this time.
0 commit comments