Skip to content

Commit d30cd7d

Browse files
committed
Review the usage of apostrophes in error messages
Closes GH-5590
1 parent 2ad75ba commit d30cd7d

File tree

421 files changed

+907
-897
lines changed

Some content is hidden

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

421 files changed

+907
-897
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/024.phpt

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@ NULL
4141
Warning: Undefined variable $b in %s on line %d
4242
int(1)
4343

44-
Warning: Attempt to read property '1' on int in %s on line %d
44+
Warning: Attempt to read property "1" on int in %s on line %d
4545
NULL
4646

47-
Warning: Attempt to read property '1' on int in %s on line %d
47+
Warning: Attempt to read property "1" on int in %s on line %d
4848
NULL
4949

5050
Warning: Undefined variable $c in %s on line %d
5151

5252
Warning: Trying to access array offset on value of type null in %s on line %d
5353

54-
Warning: Attempt to read property '1' on int in %s on line %d
54+
Warning: Attempt to read property "1" on int in %s on line %d
5555

56-
Warning: Attempt to read property '' on null in %s on line %d
56+
Warning: Attempt to read property "" on null in %s on line %d
5757
NULL

Zend/tests/026.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ print "ok\n";
2222

2323
?>
2424
--EXPECTF--
25-
Warning: Attempt to read property 'a' on null in %s on line %d
25+
Warning: Attempt to read property "a" on null in %s on line %d
2626
ok
27-
Attempt to assign property 'a' on null
27+
Attempt to assign property "a" on null
2828
ok

Zend/tests/028.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ bool(true)
1818
bool(true)
1919
bool(true)
2020

21-
Notice: Undefined offset: 2 in %s on line %d
21+
Notice: Undefined array key 2 in %s on line %d
2222

2323
Fatal error: Uncaught Error: Value of type null is not callable in %s:%d
2424
Stack trace:

Zend/tests/033.phpt

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,6 @@ Warning: Trying to access array offset on value of type null in %s on line %d
6161

6262
Warning: Trying to access array offset on value of type null in %s on line %d
6363

64-
Warning: Attempt to read property 'foo' on null in %s on line %d
65-
Attempt to assign property 'foo' on null
66-
Attempt to assign property 'bar' on null
64+
Warning: Attempt to read property "foo" on null in %s on line %d
65+
Attempt to assign property "foo" on null
66+
Attempt to assign property "bar" on null

Zend/tests/037.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var_dump($x::$x);
1616
--EXPECTF--
1717
int(1)
1818

19-
Fatal error: Uncaught Error: Access to undeclared static property: Closure::$x in %s:%d
19+
Fatal error: Uncaught Error: Access to undeclared static property Closure::$x in %s:%d
2020
Stack trace:
2121
#0 {main}
2222
thrown in %s on line %d

Zend/tests/access_modifiers_008.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ B2::test();
1818

1919
?>
2020
--EXPECTF--
21-
Fatal error: Call to protected method B1::f() from context 'B2' in %s on line %d
21+
Fatal error: Call to protected method B1::f() from scope B2 in %s on line %d

Zend/tests/access_modifiers_009.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ B2::test();
2323
--EXPECTF--
2424
bool(false)
2525

26-
Fatal error: Call to protected method B1::f() from context 'B2' in %s on line %d
26+
Fatal error: Call to protected method B1::f() from scope B2 in %s on line %d

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 scope a in %s:%d
3232
Stack trace:
3333
#0 %s(%d): a->test()
3434
#1 %s(%d): c->__construct()

Zend/tests/array_offset.phpt

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ Ensure "undefined offset" notice formats message correctly when undefined key is
1111
echo "Done\n";
1212
?>
1313
--EXPECTF--
14-
Notice: Undefined offset: -1 in %s on line 3
14+
Notice: Undefined array key -1 in %s on line %d
1515

16-
Notice: Undefined offset: -1 in %s on line 4
16+
Notice: Undefined array key -1 in %s on line %d
1717

18-
Notice: Undefined offset: -1 in %s on line 5
18+
Notice: Undefined array key -1 in %s on line 5
1919

20-
Notice: Undefined offset: -1 in %s on line 6
20+
Notice: Undefined array key -1 in %s on line 6
2121
Done

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/assign_dim_obj_null_return.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,5 @@ Cannot add element to the array as the next element is already occupied
7979
Illegal offset type
8080
Illegal offset type
8181
Cannot use a scalar value as an array
82-
Attempt to assign property 'foo' on bool
83-
Attempt to assign property 'foo' on bool
82+
Attempt to assign property "foo" on bool
83+
Attempt to assign property "foo" on bool

Zend/tests/attributes/003_ast_nodes.phpt

+2-3
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,5 @@ array(1) {
104104
}
105105

106106
int(1)
107-
string(30) "Class 'MissingClass' not found"
108-
string(30) "Class 'MissingClass' not found"
109-
107+
string(30) "Class "MissingClass" not found"
108+
string(30) "Class "MissingClass" not found"

Zend/tests/attributes/005_objects.phpt

+4-4
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,13 @@ string(7) "ERROR 2"
108108
string(74) "A1::__construct(): Argument #1 ($name) must be of type string, array given"
109109

110110
string(7) "ERROR 3"
111-
string(30) "Attribute class 'A2' not found"
111+
string(30) "Attribute class "A2" not found"
112112

113113
string(7) "ERROR 4"
114-
string(50) "Attribute constructor of class 'A3' must be public"
114+
string(48) "Attribute constructor of class A3 must be public"
115115

116116
string(7) "ERROR 5"
117-
string(71) "Attribute class 'A4' does not have a constructor, cannot pass arguments"
117+
string(69) "Attribute class A4 does not have a constructor, cannot pass arguments"
118118

119119
string(7) "ERROR 6"
120-
string(55) "Attempting to use non-attribute class 'A5' as attribute"
120+
string(55) "Attempting to use non-attribute class "A5" as attribute"

Zend/tests/attributes/006_filter.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,4 @@ Array
109109
string(7) "ERROR 1"
110110
string(103) "ReflectionFunctionAbstract::getAttributes(): Argument #2 ($flags) must be a valid attribute filter flag"
111111
string(7) "ERROR 2"
112-
string(34) "Class 'SomeMissingClass' not found"
112+
string(34) "Class "SomeMissingClass" not found"

Zend/tests/attributes/013_class_scope.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ trait T1
3434
class C2
3535
{
3636
use T1;
37-
37+
3838
private const FOO = 'bar';
3939
}
4040

@@ -109,7 +109,7 @@ Array
109109
[1] => bar
110110
)
111111
string(7) "ERROR 1"
112-
string(36) "Undefined class constant 'self::FOO'"
112+
string(28) "Undefined constant self::FOO"
113113

114114
bool(true)
115115
string(3) "bar"

Zend/tests/attributes/023_ast_node_in_validation.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ class A1 { }
88

99
?>
1010
--EXPECTF--
11-
Fatal error: Class 'Foo' not found in %s
11+
Fatal error: Class "Foo" not found in %s on line %d

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/bug29883.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ bool(false)
1515
bool(true)
1616
bool(true)
1717

18-
Warning: Uninitialized string offset: -10 in %s on line %d
18+
Warning: Uninitialized string offset -10 in %s on line %d
1919
string(0) ""
2020
string(1) "u"
2121
string(1) "u"

Zend/tests/bug30519.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class test implements a {
66
}
77
?>
88
--EXPECTF--
9-
Fatal error: Uncaught Error: Interface 'a' not found in %s:%d
9+
Fatal error: Uncaught Error: Interface "a" not found in %s:%d
1010
Stack trace:
1111
#0 {main}
1212
thrown in %s on line %d

Zend/tests/bug30922.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var_dump($a instanceOf A);
1010
echo "ok\n";
1111
?>
1212
--EXPECTF--
13-
Fatal error: Uncaught Error: Interface 'RecurisiveFooFar' not found in %s:%d
13+
Fatal error: Uncaught Error: Interface "RecurisiveFooFar" not found in %s:%d
1414
Stack trace:
1515
#0 {main}
1616
thrown in %s on line %d

Zend/tests/bug31098.phpt

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ ok
4444
ok
4545
ok
4646

47-
Warning: Attempt to read property 'wrong' on string in %s on line %d
47+
Warning: Attempt to read property "wrong" on string in %s on line %d
4848
ok
4949

50-
Warning: Illegal string offset 'wrong' in %s on line %d
50+
Warning: Illegal string offset "wrong" in %s on line %d
5151
ok
5252
ok
5353

54-
Warning: Illegal string offset 'wrong' in %s on line %d
54+
Warning: Illegal string offset "wrong" in %s on line %d
5555
ok

Zend/tests/bug31102.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Caught: Test1::__construct
4343
Caught: {closure}
4444
{closure}(Test3,3)
4545

46-
Fatal error: Uncaught Error: Class 'Test3' not found in %sbug31102.php(%d) : eval()'d code:1
46+
Fatal error: Uncaught Error: Class "Test3" not found in %s:%d
4747
Stack trace:
4848
#0 %s(%d): eval()
4949
#1 {main}

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 scope B4 in %s:%d
136136
Stack trace:
137137
#0 %s(%d): B4::doTest()
138138
#1 {main}

Zend/tests/bug37667.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var_dump($obj);
2929
--EXPECTF--
3030
string(3) "bar"
3131

32-
Notice: Undefined offset: 2 in %sbug37667.php on line 16
32+
Notice: Undefined array key 2 in %s on line %d
3333
NULL
3434
object(Test)#%d (1) {
3535
["property":protected]=>

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/bug39018.phpt

+13-13
Original file line numberDiff line numberDiff line change
@@ -64,39 +64,39 @@ print "\nDone\n";
6464
--EXPECTF--
6565
Warning: String offset cast occurred in %s on line %d
6666

67-
Warning: Uninitialized string offset: %s in %s on line %d
67+
Warning: Uninitialized string offset %d in %s on line %d
6868

69-
Warning: Uninitialized string offset: 0 in %s on line %d
69+
Warning: Uninitialized string offset 0 in %s on line %d
7070

71-
Warning: Uninitialized string offset: 0 in %s on line %d
71+
Warning: Uninitialized string offset 0 in %s on line %d
7272

7373
Warning: String offset cast occurred in %s on line %d
7474

75-
Warning: Uninitialized string offset: %i in %s on line %d
75+
Warning: Uninitialized string offset %d in %s on line %d
7676

7777
Warning: String offset cast occurred in %s on line %d
7878

79-
Warning: Uninitialized string offset: %i in %s on line %d
79+
Warning: Uninitialized string offset %d in %s on line %d
8080

81-
Warning: Uninitialized string offset: 0 in %s on line %d
81+
Warning: Uninitialized string offset 0 in %s on line %d
8282

83-
Warning: Uninitialized string offset: 4 in %s on line %d
83+
Warning: Uninitialized string offset 4 in %s on line %d
8484

85-
Warning: Uninitialized string offset: 4 in %s on line %d
85+
Warning: Uninitialized string offset 4 in %s on line %d
8686

87-
Warning: Uninitialized string offset: 4 in %s on line %d
87+
Warning: Uninitialized string offset 4 in %s on line %d
8888

89-
Warning: Uninitialized string offset: 4 in %s on line %d
89+
Warning: Uninitialized string offset 4 in %s on line %d
9090

91-
Warning: Uninitialized string offset: 4 in %s on line %d
91+
Warning: Uninitialized string offset 4 in %s on line %d
9292

9393
Warning: String offset cast occurred in %s on line %d
9494

95-
Warning: Uninitialized string offset: 12 in %s on line %d
95+
Warning: Uninitialized string offset 12 in %s on line %d
9696

9797
Warning: String offset cast occurred in %s on line %d
9898

99-
Warning: Uninitialized string offset: 12 in %s on line %d
99+
Warning: Uninitialized string offset 12 in %s on line %d
100100

101101
Warning: String offset cast occurred in %s on line %d
102102

Zend/tests/bug39304.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ Bug #39304 (Segmentation fault with list unpacking of string offset)
77
var_dump($a,$b);
88
?>
99
--EXPECTF--
10-
Warning: Uninitialized string offset: 0 in %s on line %d
10+
Warning: Uninitialized string offset 0 in %s on line %d
1111
NULL
1212
NULL

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 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/bug42937.phpt

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ test3
3939
test4
4040
test5
4141

42-
Fatal error: Uncaught Error: Call to undefined method C::test6() in %sbug42937.php:21
42+
Fatal error: Uncaught Error: Call to undefined method C::test6() in %s:%d
4343
Stack trace:
4444
#0 %s(%d): B->test()
4545
#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}

0 commit comments

Comments
 (0)