Skip to content

Commit e0f48c0

Browse files
committed
Review the usage of apostrophes in error messages
Additionally, fixing some capitalization problems and wordings.
1 parent 1179686 commit e0f48c0

File tree

97 files changed

+190
-190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+190
-190
lines changed

Zend/tests/018.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var_dump(constant("TEST_CONST2"));
1818
echo "Done\n";
1919
?>
2020
--EXPECT--
21-
Undefined constant ''
21+
Undefined constant
2222
int(1)
2323
string(4) "test"
2424
Done

Zend/tests/access_modifiers_010.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ new c;
2828

2929
?>
3030
--EXPECTF--
31-
Fatal error: Uncaught Error: Call to private method d::test2() from context 'a' in %s:%d
31+
Fatal error: Uncaught Error: Call to private method d::test2() from context "a" in %s:%d
3232
Stack trace:
3333
#0 %s(%d): a->test()
3434
#1 %s(%d): c->__construct()

Zend/tests/array_unpack/classes.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ array(3) {
4343
[2]=>
4444
int(3)
4545
}
46-
Exception: Cannot declare self-referencing constant 'self::B'
46+
Exception: Cannot declare self-referencing constant self::B

Zend/tests/bug29015.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ object(stdClass)#1 (1) {
1515
string(10) "string('')"
1616
}
1717

18-
Fatal error: Uncaught Error: Cannot access property started with '\0' in %s:%d
18+
Fatal error: Uncaught Error: Cannot access property starting with "\0" in %s:%d
1919
Stack trace:
2020
#0 {main}
2121
thrown in %s on line %d

Zend/tests/bug37632.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ B2::doTest
132132
C2::test
133133
B4::doTest
134134

135-
Fatal error: Uncaught Error: Call to protected C4::__construct() from context 'B4' in %sbug37632.php:%d
135+
Fatal error: Uncaught Error: Call to protected C4::__construct() from context "B4" in %s:%d
136136
Stack trace:
137137
#0 %s(%d): B4::doTest()
138138
#1 {main}

Zend/tests/bug37811.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ string(3) "Foo"
2323

2424
Warning: Constants may only evaluate to scalar values, arrays or resources in %sbug37811.php on line %d
2525

26-
Fatal error: Uncaught Error: Undefined constant 'Baz' in %s:%d
26+
Fatal error: Uncaught Error: Undefined constant Baz in %s:%d
2727
Stack trace:
2828
#0 {main}
2929
thrown in %s on line %d

Zend/tests/bug41633_2.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Foo {
88
echo Foo::A."\n";
99
?>
1010
--EXPECTF--
11-
Fatal error: Uncaught Error: Undefined class constant 'self::B' in %sbug41633_2.php:5
11+
Fatal error: Uncaught Error: Undefined class constant self::B in %s:%d
1212
Stack trace:
1313
#0 {main}
1414
thrown in %sbug41633_2.php on line 5

Zend/tests/bug41633_3.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class Foo {
99
echo Foo::A;
1010
?>
1111
--EXPECTF--
12-
Fatal error: Uncaught Error: Cannot declare self-referencing constant 'Foo::B' in %sbug41633_3.php:%d
12+
Fatal error: Uncaught Error: Cannot declare self-referencing constant Foo::B in %s:%d
1313
Stack trace:
1414
#0 {main}
1515
thrown in %sbug41633_3.php on line %d

Zend/tests/bug42819.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ Array
297297
[1] => 1
298298
)
299299

300-
Fatal error: Uncaught Error: Undefined constant 'foo\foo\unknown' in %sbug42819.php:%d
300+
Fatal error: Uncaught Error: Undefined constant foo\foo\unknown in %s:%d
301301
Stack trace:
302302
#0 %s(%d): foo\oops()
303303
#1 {main}

Zend/tests/bug43344_1.phpt

+4-4
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ try {
3939

4040
?>
4141
--EXPECT--
42-
Undefined constant 'Foo\bar'
43-
Undefined constant 'Foo\bar'
44-
Undefined constant 'Foo\bar'
45-
Undefined constant 'Foo\bar'
42+
Undefined constant Foo\bar
43+
Undefined constant Foo\bar
44+
Undefined constant Foo\bar
45+
Undefined constant Foo\bar

Zend/tests/bug43344_10.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Bug #43344.10 (Wrong error message for undefined namespace constant)
55
echo namespace\bar."\n";
66
?>
77
--EXPECTF--
8-
Fatal error: Uncaught Error: Undefined constant 'bar' in %sbug43344_10.php:%d
8+
Fatal error: Uncaught Error: Undefined constant bar in %s:%d
99
Stack trace:
1010
#0 {main}
1111
thrown in %sbug43344_10.php on line %d

Zend/tests/bug43344_11.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function f($a=namespace\bar) {
88
echo f()."\n";
99
?>
1010
--EXPECTF--
11-
Fatal error: Uncaught Error: Undefined constant 'bar' in %sbug43344_11.php:%d
11+
Fatal error: Uncaught Error: Undefined constant bar in %s:%d
1212
Stack trace:
1313
#0 %s(%d): f()
1414
#1 {main}

Zend/tests/bug43344_12.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function f($a=array(namespace\bar)) {
88
echo f()."\n";
99
?>
1010
--EXPECTF--
11-
Fatal error: Uncaught Error: Undefined constant 'bar' in %sbug43344_12.php:%d
11+
Fatal error: Uncaught Error: Undefined constant bar in %s:%d
1212
Stack trace:
1313
#0 %s(%d): f()
1414
#1 {main}

Zend/tests/bug43344_13.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function f($a=array(namespace\bar=>0)) {
99
echo f()."\n";
1010
?>
1111
--EXPECTF--
12-
Fatal error: Uncaught Error: Undefined constant 'bar' in %sbug43344_13.php:%d
12+
Fatal error: Uncaught Error: Undefined constant bar in %s:%d
1313
Stack trace:
1414
#0 %s(%d): f()
1515
#1 {main}

Zend/tests/bug43344_6.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ namespace Foo;
66
echo namespace\bar."\n";
77
?>
88
--EXPECTF--
9-
Fatal error: Uncaught Error: Undefined constant 'Foo\bar' in %sbug43344_6.php:%d
9+
Fatal error: Uncaught Error: Undefined constant Foo\bar in %s:%d
1010
Stack trace:
1111
#0 {main}
1212
thrown in %sbug43344_6.php on line %d

Zend/tests/bug43344_7.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function f($a=namespace\bar) {
99
echo f()."\n";
1010
?>
1111
--EXPECTF--
12-
Fatal error: Uncaught Error: Undefined constant 'Foo\bar' in %sbug43344_7.php:%d
12+
Fatal error: Uncaught Error: Undefined constant Foo\bar in %s:%d
1313
Stack trace:
1414
#0 %s(%d): Foo\f()
1515
#1 {main}

Zend/tests/bug43344_8.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function f($a=array(namespace\bar)) {
99
echo f()."\n";
1010
?>
1111
--EXPECTF--
12-
Fatal error: Uncaught Error: Undefined constant 'Foo\bar' in %sbug43344_8.php:%d
12+
Fatal error: Uncaught Error: Undefined constant Foo\bar in %s:%d
1313
Stack trace:
1414
#0 %s(%d): Foo\f()
1515
#1 {main}

Zend/tests/bug43344_9.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function f($a=array(namespace\bar=>0)) {
1010
echo f()."\n";
1111
?>
1212
--EXPECTF--
13-
Fatal error: Uncaught Error: Undefined constant 'Foo\bar' in %sbug43344_9.php:%d
13+
Fatal error: Uncaught Error: Undefined constant Foo\bar in %s:%d
1414
Stack trace:
1515
#0 %s(%d): Foo\f()
1616
#1 {main}

Zend/tests/bug44141.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Y extends X
2222
$y = Y::cheat(5);
2323
echo $y->x, PHP_EOL;
2424
--EXPECTF--
25-
Fatal error: Uncaught Error: Call to private X::__construct() from context 'Y' in %sbug44141.php:15
25+
Fatal error: Uncaught Error: Call to private X::__construct() from context "Y" in %s:%d
2626
Stack trace:
2727
#0 %s(%d): Y::cheat(5)
2828
#1 {main}

Zend/tests/bug46304.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ value3
3232
value3
3333
value3
3434

35-
Fatal error: Uncaught Error: Undefined constant 'NS1\ns2\coNSt1' in %sbug46304.php:%d
35+
Fatal error: Uncaught Error: Undefined constant NS1\ns2\coNSt1 in %s:%d
3636
Stack trace:
3737
#0 {main}
3838
thrown in %sbug46304.php on line %d

Zend/tests/bug47572.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ $foo = new Foo();
1414

1515
?>
1616
--EXPECTF--
17-
Fatal error: Uncaught Error: Undefined constant 'FOO' in %s:%d
17+
Fatal error: Uncaught Error: Undefined constant FOO in %s:%d
1818
Stack trace:
1919
#0 {main}
2020
thrown in %s on line %d

Zend/tests/bug51791.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ try {
1414

1515
?>
1616
--EXPECT--
17-
Undefined class constant 'A::B1'
17+
Undefined class constant A::B1

Zend/tests/bug52484.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ unset($a->$prop);
1616

1717
?>
1818
--EXPECTF--
19-
Fatal error: Uncaught Error: Cannot access property started with '\0' in %s:%d
19+
Fatal error: Uncaught Error: Cannot access property starting with "\0" in %s:%d
2020
Stack trace:
2121
#0 %s(%d): A->__unset('\x00')
2222
#1 {main}

Zend/tests/bug52484_2.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $a->$prop = 2;
1616

1717
?>
1818
--EXPECTF--
19-
Fatal error: Uncaught Error: Cannot access property started with '\0' in %s:%d
19+
Fatal error: Uncaught Error: Cannot access property starting with "\0" in %s:%d
2020
Stack trace:
2121
#0 %s(%d): A->__set('\x00', 2)
2222
#1 {main}

Zend/tests/bug52484_3.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var_dump($a->$prop);
1616

1717
?>
1818
--EXPECTF--
19-
Fatal error: Uncaught Error: Cannot access property started with '\0' in %s:%d
19+
Fatal error: Uncaught Error: Cannot access property starting with "\0" in %s:%d
2020
Stack trace:
2121
#0 %s(%d): A->__get('\x00')
2222
#1 {main}

Zend/tests/bug61025.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Warning: The magic method InvokeAble::__invoke() cannot be static in %sbug61025.
2424

2525
Warning: The magic method Bar::__invoke() must have public visibility in %sbug61025.php on line %d
2626
Bar
27-
Fatal error: Uncaught Error: Call to private method Bar::__invoke() from context '' in %sbug61025.php:%d
27+
Fatal error: Uncaught Error: Call to private method Bar::__invoke() from context "" in %s:%d
2828
Stack trace:
2929
#0 {main}
3030
thrown in %sbug61025.php on line %d

Zend/tests/bug69755.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Bug #69755: segfault in ZEND_CONCAT_SPEC_TMPVAR_CONST_HANDLER
55
c . 10;
66
?>
77
--EXPECTF--
8-
Fatal error: Uncaught Error: Undefined constant 'c' in %s:%d
8+
Fatal error: Uncaught Error: Undefined constant c in %s:%d
99
Stack trace:
1010
#0 {main}
1111
thrown in %s on line %d

Zend/tests/bug69788.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Bug #69788: Malformed script causes Uncaught Error in php-cgi, valgrind SIGILL
33
--FILE--
44
<?php [t.[]]; ?>
55
--EXPECTF--
6-
Fatal error: Uncaught Error: Undefined constant 't' in %s:%d
6+
Fatal error: Uncaught Error: Undefined constant t in %s:%d
77
Stack trace:
88
#0 {main}
99
thrown in %s on line %d

Zend/tests/bug70164.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ __halt_compiler();
2424
%d
2525
%d
2626

27-
Fatal error: Uncaught Error: Undefined constant 'Foo\__COMPILER_HALT_OFFSET__' in %s:%d
27+
Fatal error: Uncaught Error: Undefined constant Foo\__COMPILER_HALT_OFFSET__ in %s:%d
2828
Stack trace:
2929
#0 {main}
3030
thrown in %s on line %d

Zend/tests/bug74657.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ try {
1919
var_dump((new C)->options);
2020
?>
2121
--EXPECTF--
22-
Fatal error: Uncaught Error: Undefined class constant 'I::FOO' in %sbug74657.php:%d
22+
Fatal error: Uncaught Error: Undefined class constant I::FOO in %s:%d
2323
Stack trace:
2424
#0 {main}
2525
thrown in %sbug74657.php on line %d

Zend/tests/bug76869.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ try {
2020
}
2121
?>
2222
--EXPECT--
23-
Exception: Call to protected method B::f() from context ''
23+
Exception: Call to protected method B::f() from context ""

Zend/tests/bug77738.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Bug #77738 (Nullptr deref in zend_compile_expr)
55
__COMPILER_HALT_OFFSET__;
66
; // <- important
77
--EXPECTF--
8-
Fatal error: Uncaught Error: Undefined constant '__COMPILER_HALT_OFFSET__' in %s:%d
8+
Fatal error: Uncaught Error: Undefined constant __COMPILER_HALT_OFFSET__ in %s:%d
99
Stack trace:
1010
#0 {main}
1111
thrown in %s on line %d

Zend/tests/class_constants_001.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ echo "Done\n";
1919
string(6) "string"
2020
int(1)
2121

22-
Fatal error: Uncaught Error: Undefined class constant 'test::val3' in %s:%d
22+
Fatal error: Uncaught Error: Undefined class constant test::val3 in %s:%d
2323
Stack trace:
2424
#0 {main}
2525
thrown in %s on line %d

Zend/tests/closure_033.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ $o->func();
2525
--EXPECTF--
2626
{closure}()
2727

28-
Fatal error: Uncaught Error: Call to private method Test::func() from context '' in %sclosure_033.php:%d
28+
Fatal error: Uncaught Error: Call to private method Test::func() from context "" in %s:%d
2929
Stack trace:
3030
#0 {main}
3131
thrown in %sclosure_033.php on line %d

Zend/tests/closures/closure_instantiate.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ try {
1818

1919
?>
2020
--EXPECT--
21-
ERROR: Instantiation of 'Closure' is not allowed
21+
ERROR: Instantiation of Closure is not allowed

Zend/tests/constant_expressions_self_referencing_array.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class A {
99
var_dump(A::FOO);
1010
?>
1111
--EXPECTF--
12-
Fatal error: Uncaught Error: Cannot declare self-referencing constant 'self::BAR' in %s:%d
12+
Fatal error: Uncaught Error: Cannot declare self-referencing constant self::BAR in %s:%d
1313
Stack trace:
1414
#0 {main}
1515
thrown in %s on line %d

Zend/tests/constants_002.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ var_dump(foo);
1616
?>
1717
--EXPECTF--
1818
Warning: Constants may only evaluate to scalar values, arrays or resources in %s on line %d
19-
Undefined constant 'foo'
19+
Undefined constant foo
2020
resource(5) of type (stream)

Zend/tests/halt_compiler5.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Using __COMPILER_HALF_OFFSET__ with trailing {} (OSS-Fuzz #17895)
55
__COMPILER_HALT_OFFSET__;
66
{}
77
--EXPECTF--
8-
Fatal error: Uncaught Error: Undefined constant '__COMPILER_HALT_OFFSET__' in %s:%d
8+
Fatal error: Uncaught Error: Undefined constant __COMPILER_HALT_OFFSET__ in %s:%d
99
Stack trace:
1010
#0 {main}
1111
thrown in %s on line %d

Zend/tests/invalid_parent_const_ref_leak.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ try {
1515

1616
?>
1717
--EXPECT--
18-
Cannot access parent:: when current class scope has no parent
18+
Cannot access parent when current class scope has no parent

Zend/tests/ns_041.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ok
1717
ok
1818
ok
1919

20-
Fatal error: Uncaught Error: Undefined constant 'test\ns1\BAR' in %s:%d
20+
Fatal error: Uncaught Error: Undefined constant test\ns1\BAR in %s:%d
2121
Stack trace:
2222
#0 {main}
2323
thrown in %s on line %d

Zend/tests/ns_057.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const ok
5656
class ok
5757
ok
5858

59-
Fatal error: Uncaught Error: Undefined constant 'Test\ns1\unknown' in %sns_057.php:%d
59+
Fatal error: Uncaught Error: Undefined constant Test\ns1\unknown in %s:%d
6060
Stack trace:
6161
#0 {main}
6262
thrown in %sns_057.php on line %d

Zend/tests/ns_058.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const ok
5454
class ok
5555
ok
5656

57-
Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_058.php:%d
57+
Fatal error: Uncaught Error: Undefined constant unknown in %s:%d
5858
Stack trace:
5959
#0 {main}
6060
thrown in %sns_058.php on line %d

Zend/tests/ns_076.phpt

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ try {
2525

2626
?>
2727
--EXPECT--
28-
Undefined constant 'foo\unknown'
29-
Undefined constant 'foo\unknown'
30-
Undefined constant 'unknown'
28+
Undefined constant foo\unknown
29+
Undefined constant foo\unknown
30+
Undefined constant unknown

Zend/tests/ns_077_1.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function foo($a = array(0 => \unknown))
1010

1111
foo();
1212
--EXPECTF--
13-
Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_077_%d.php:%d
13+
Fatal error: Uncaught Error: Undefined constant unknown in %s:%d
1414
Stack trace:
1515
#0 %s(%d): foo\foo()
1616
#1 {main}

Zend/tests/ns_077_2.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ function foo($a = array(\unknown => unknown))
1010

1111
foo();
1212
--EXPECTF--
13-
Fatal error: Uncaught Error: Undefined constant 'unknown' in %sns_077_%d.php:%d
13+
Fatal error: Uncaught Error: Undefined constant unknown in %s:%d
1414
Stack trace:
1515
#0 %s(%d): foo\foo()
1616
#1 {main}

0 commit comments

Comments
 (0)