Skip to content

Commit 24adac5

Browse files
committed
fix test
1 parent c5f3db8 commit 24adac5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Zend/zend_execute.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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));

tests/classes/inner_classes/visibility_004.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $x->test();
1818
var_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
2222
Stack trace:
2323
#0 %s(%d): Outer->test()
2424
#1 {main}

0 commit comments

Comments
 (0)