Skip to content

Commit 7ce8c5a

Browse files
committed
Slipt error messages while checking magic methods attributes
Closes phpGH-5465
1 parent f38d6ce commit 7ce8c5a

20 files changed

+32
-24
lines changed

Zend/tests/bug61025.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ echo $b->__invoke();
2020

2121
?>
2222
--EXPECTF--
23-
Warning: The magic method InvokeAble::__invoke() must have public visibility and cannot be static in %sbug61025.php on line %d
23+
Warning: The magic method InvokeAble::__invoke() cannot be static in %sbug61025.php on line %d
2424

25-
Warning: The magic method Bar::__invoke() must have public visibility and cannot be static in %sbug61025.php on line %d
25+
Warning: The magic method Bar::__invoke() must have public visibility in %sbug61025.php on line %d
2626
Bar
2727
Fatal error: Uncaught Error: Call to private method Bar::__invoke() from context '' in %sbug61025.php:%d
2828
Stack trace:

Zend/tests/bug65322.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ eval('class A { private function __invoke() { } }');
1919

2020
?>
2121
--EXPECTF--
22-
string(%d) "The magic method A::__invoke() must have public visibility and cannot be static"
22+
string(%d) "The magic method A::__invoke() must have public visibility"
2323
string(%d) "%s(%d) : eval()'d code"
2424
string(1) "X"

Zend/tests/bug67436/bug67436.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ a::staticTest();
2222
$b = new b();
2323
$b->test();
2424
--EXPECTF--
25-
string(%d) "The magic method b::__invoke() must have public visibility and cannot be static"
25+
string(%d) "The magic method b::__invoke() must have public visibility"
2626
b::test()
2727
a::test(c::TESTCONSTANT)

Zend/tests/bug67436/bug67436_nohandler.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ a::staticTest();
1414
$b = new b();
1515
$b->test();
1616
--EXPECTF--
17-
Warning: The magic method b::__invoke() must have public visibility and cannot be static in %s on line %d
17+
Warning: The magic method b::__invoke() must have public visibility in %s on line %d
1818
b::test()
1919
a::test(c::TESTCONSTANT)

Zend/tests/bug70215.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ $b();
1717

1818
?>
1919
--EXPECTF--
20-
Warning: The magic method A::__invoke() must have public visibility and cannot be static in %s on line %d
20+
Warning: The magic method A::__invoke() cannot be static in %s on line %d
2121
A

Zend/tests/errmsg_045.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ eval('class A { private function __invoke() { } }');
1414

1515
?>
1616
--EXPECTF--
17-
string(%d) "The magic method A::__invoke() must have public visibility and cannot be static"
17+
string(%d) "The magic method A::__invoke() must have public visibility"
1818
string(%d) "%s(%d) : eval()'d code"
1919

2020
Warning: Undefined variable $undefined in %s on line %d

Zend/tests/magic_methods_002.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ class foo {
1111

1212
?>
1313
--EXPECTF--
14-
Warning: The magic method foo::__unset() must have public visibility and cannot be static in %s on line %d
14+
Warning: The magic method foo::__unset() must have public visibility in %s on line %d

Zend/tests/magic_methods_003.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ class foo {
1111

1212
?>
1313
--EXPECTF--
14-
Warning: The magic method foo::__unset() must have public visibility and cannot be static in %s on line %d
14+
Warning: The magic method foo::__unset() cannot be static in %s on line %d

Zend/tests/magic_methods_004.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ class foo {
1111

1212
?>
1313
--EXPECTF--
14-
Warning: The magic method foo::__unset() must have public visibility and cannot be static in %s on line %d
14+
Warning: The magic method foo::__unset() must have public visibility in %s on line %d

Zend/tests/magic_methods_005.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ interface a {
99

1010
?>
1111
--EXPECTF--
12-
Warning: The magic method a::__call() must have public visibility and cannot be static in %s on line %d
12+
Warning: The magic method a::__call() cannot be static in %s on line %d

0 commit comments

Comments
 (0)