File tree 7 files changed +20
-20
lines changed
7 files changed +20
-20
lines changed Original file line number Diff line number Diff line change @@ -70,10 +70,10 @@ Warning: file_get_contents( ): Failed to open stream: Permission denied in %s on
70
70
bool(false)
71
71
72
72
-- Filename: \0 --
73
- TypeError : file_get_contents(): Argument #1 ($filename) must be a valid path, string given
73
+ ValueError : file_get_contents(): Argument #1 ($filename) must not contain any null bytes
74
74
75
75
-- Filename: array() --
76
- TypeError: file_get_contents(): Argument #1 ($filename) must be a valid path , array given
76
+ TypeError: file_get_contents(): Argument #1 ($filename) must be of type string , array given
77
77
78
78
-- Filename: /no/such/file/dir --
79
79
Original file line number Diff line number Diff line change @@ -70,10 +70,10 @@ Warning: file_put_contents( ): Failed to open stream: Permission denied in %s on
70
70
Failed to write data to: " "
71
71
72
72
-- Filename: \0 --
73
- TypeError : file_put_contents(): Argument #1 ($filename) must be a valid path, string given
73
+ ValueError : file_put_contents(): Argument #1 ($filename) must not contain any null bytes
74
74
75
75
-- Filename: array() --
76
- TypeError: file_put_contents(): Argument #1 ($filename) must be a valid path , array given
76
+ TypeError: file_put_contents(): Argument #1 ($filename) must be of type string , array given
77
77
78
78
-- Filename: /no/such/file/dir --
79
79
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ foreach($patterns as $pattern) {
49
49
var_dump ( glob ($ pattern , GLOB_NOCHECK ) );
50
50
var_dump ( glob ($ pattern , GLOB_NOESCAPE ) );
51
51
var_dump ( glob ($ pattern , GLOB_ERR ) );
52
- } catch (TypeError $ e ) {
52
+ } catch (Error $ e ) {
53
53
echo $ e ->getMessage (), "\n" ;
54
54
}
55
55
$ counter ++;
@@ -75,7 +75,7 @@ foreach($patterns as $pattern) {
75
75
echo "-- Iteration $ counter -- \n" ;
76
76
try {
77
77
var_dump ( glob ($ pattern , GLOB_ONLYDIR ) );
78
- } catch (TypeError $ e ) {
78
+ } catch (Error $ e ) {
79
79
echo $ e ->getMessage (), "\n" ;
80
80
}
81
81
$ counter ++;
@@ -330,7 +330,7 @@ array(0) {
330
330
}
331
331
332
332
-- Iteration 8 --
333
- glob(): Argument #1 ($pattern) must be a valid path, string given
333
+ glob(): Argument #1 ($pattern) must not contain any null bytes
334
334
335
335
-- Iteration 9 --
336
336
array(0) {
@@ -433,7 +433,7 @@ array(1) {
433
433
array(0) {
434
434
}
435
435
-- Iteration 8 --
436
- glob(): Argument #1 ($pattern) must be a valid path, string given
436
+ glob(): Argument #1 ($pattern) must not contain any null bytes
437
437
-- Iteration 9 --
438
438
array(0) {
439
439
}
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ foreach($patterns as $pattern) {
48
48
var_dump ( glob ($ pattern , GLOB_NOCHECK ) );
49
49
var_dump ( glob ($ pattern , GLOB_NOESCAPE ) );
50
50
var_dump ( glob ($ pattern , GLOB_ERR ) );
51
- } catch (TypeError $ e ) {
51
+ } catch (Error $ e ) {
52
52
echo $ e ->getMessage (), "\n" ;
53
53
}
54
54
$ counter ++;
@@ -74,7 +74,7 @@ foreach($patterns as $pattern) {
74
74
echo "-- Iteration $ counter -- \n" ;
75
75
try {
76
76
var_dump ( glob ($ pattern , GLOB_ONLYDIR ) );
77
- } catch (TypeError $ e ) {
77
+ } catch (Error $ e ) {
78
78
echo $ e ->getMessage (), "\n" ;
79
79
}
80
80
$ counter ++;
@@ -329,7 +329,7 @@ array(0) {
329
329
}
330
330
331
331
-- Iteration 8 --
332
- glob(): Argument #1 ($pattern) must be a valid path, string given
332
+ glob(): Argument #1 ($pattern) must not contain any null bytes
333
333
334
334
-- Iteration 9 --
335
335
array(0) {
@@ -432,7 +432,7 @@ array(1) {
432
432
array(0) {
433
433
}
434
434
-- Iteration 8 --
435
- glob(): Argument #1 ($pattern) must be a valid path, string given
435
+ glob(): Argument #1 ($pattern) must not contain any null bytes
436
436
-- Iteration 9 --
437
437
array(0) {
438
438
}
Original file line number Diff line number Diff line change @@ -65,10 +65,10 @@ ValueError: Path cannot be empty
65
65
Warning: readfile( ): Failed to open stream: Permission denied in %s on line %d
66
66
67
67
-- Filename: \0 --
68
- TypeError : readfile(): Argument #1 ($filename) must be a valid path, string given
68
+ ValueError : readfile(): Argument #1 ($filename) must not contain any null bytes
69
69
70
70
-- Filename: array() --
71
- TypeError: readfile(): Argument #1 ($filename) must be a valid path , array given
71
+ TypeError: readfile(): Argument #1 ($filename) must be of type string , array given
72
72
73
73
-- Filename: /no/such/file/dir --
74
74
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ for( $i=0; $i<count($names_arr); $i++ ) {
59
59
echo "-- Iteration $ i -- \n" ;
60
60
try {
61
61
$ file_name = tempnam ($ file_path , $ names_arr [$ i ]);
62
- } catch (TypeError $ e ) {
62
+ } catch (Error $ e ) {
63
63
echo $ e ->getMessage (), "\n" ;
64
64
continue ;
65
65
}
@@ -106,9 +106,9 @@ Notice: tempnam(): file created in the system's temporary directory in %stempnam
106
106
Failed, not created in the correct directory %s vs %s
107
107
0
108
108
-- Iteration 6 --
109
- tempnam(): Argument #2 ($prefix) must be a valid path, string given
109
+ tempnam(): Argument #2 ($prefix) must not contain any null bytes
110
110
-- Iteration 7 --
111
- tempnam(): Argument #2 ($prefix) must be a valid path , array given
111
+ tempnam(): Argument #2 ($prefix) must be of type string , array given
112
112
-- Iteration 8 --
113
113
OK
114
114
-- Iteration 9 --
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ for( $i=0; $i<count($names_arr); $i++ ) {
34
34
echo "-- Iteration $ i -- \n" ;
35
35
try {
36
36
$ file_name = tempnam ($ names_arr [$ i ], "tempnam_variation3.tmp " );
37
- } catch (TypeError $ e ) {
37
+ } catch (Error $ e ) {
38
38
echo $ e ->getMessage (), "\n" ;
39
39
continue ;
40
40
}
@@ -96,9 +96,9 @@ File name is => %s%et%s
96
96
File permissions are => 100666
97
97
File created in => temp dir
98
98
-- Iteration 6 --
99
- tempnam(): Argument #1 ($dir) must be a valid path, string given
99
+ tempnam(): Argument #1 ($dir) must not contain any null bytes
100
100
-- Iteration 7 --
101
- tempnam(): Argument #1 ($dir) must be a valid path , array given
101
+ tempnam(): Argument #1 ($dir) must be of type string , array given
102
102
-- Iteration 8 --
103
103
104
104
Notice: tempnam(): file created in the system's temporary directory in %stempnam_variation7-win32.php on line %d
You can’t perform that action at this time.
0 commit comments