File tree Expand file tree Collapse file tree 10 files changed +86
-3
lines changed Expand file tree Collapse file tree 10 files changed +86
-3
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,8 @@ PHP_FUNCTION(dir)
160
160
static php_stream * php_dir_get_directory_stream_from_user_arg (php_stream * dir_stream )
161
161
{
162
162
if (dir_stream == NULL ) {
163
+ php_error_docref (NULL , E_DEPRECATED ,
164
+ "Passing null is deprecated, instead the last opened directory stream should be provided" );
163
165
if (UNEXPECTED (DIRG (default_dir ) == NULL )) {
164
166
zend_type_error ("No resource supplied" );
165
167
return NULL ;
Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ rmdir($dir_path);
44
44
*** Testing closedir() : basic functionality ***
45
45
46
46
-- Call closedir() with no arguments: --
47
+
48
+ Deprecated: closedir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
47
49
NULL
48
50
-- Check Directory Handle: --
49
51
resource(%d) of type (Unknown)
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ rmdir($dir_path);
38
38
*** Testing closedir() : basic functionality ***
39
39
40
40
-- Call closedir() with no arguments: --
41
+
42
+ Deprecated: closedir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
41
43
NULL
42
44
-- Check Directory Handle: --
43
45
resource(%d) of type (Unknown)
Original file line number Diff line number Diff line change 8
8
echo $ e ->getMessage (), "\n" ;
9
9
}
10
10
?>
11
- --EXPECT--
11
+ --EXPECTF--
12
+ Deprecated: closedir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
12
13
No resource supplied
Original file line number Diff line number Diff line change @@ -65,6 +65,18 @@ string(9) "file3.tmp"
65
65
66
66
-- Call readdir() without $path argument --
67
67
resource(%d) of type (stream)
68
+
69
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
70
+
71
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
72
+
73
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
74
+
75
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
76
+
77
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
78
+
79
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
68
80
string(1) "."
69
81
string(2) ".."
70
82
string(9) "file1.tmp"
Original file line number Diff line number Diff line change @@ -59,6 +59,18 @@ string(9) "file3.tmp"
59
59
60
60
-- Call readdir() without $path argument --
61
61
resource(%d) of type (stream)
62
+
63
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
64
+
65
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
66
+
67
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
68
+
69
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
70
+
71
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
72
+
73
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
62
74
string(1) "."
63
75
string(2) ".."
64
76
string(9) "file1.tmp"
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ closedir();
61
61
$ dir_path = __DIR__ . "/私はガラスを食べられますreaddir_variation6 " ;
62
62
rmdir ($ dir_path );
63
63
?>
64
- --EXPECT --
64
+ --EXPECTF --
65
65
*** Testing readdir() : usage variations ***
66
66
67
67
-- Reading Directory Contents with Previous Handle --
@@ -72,8 +72,22 @@ string(59) "私はガラスを食べられますreaddir_variation62.tmp"
72
72
string(59) "私はガラスを食べられますreaddir_variation63.tmp"
73
73
74
74
-- Reading Directory Contents with Current Handle (no arguments supplied) --
75
+
76
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
77
+
78
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
79
+
80
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
81
+
82
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
83
+
84
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
85
+
86
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
75
87
string(1) "."
76
88
string(2) ".."
77
89
string(59) "私はガラスを食べられますreaddir_variation61.tmp"
78
90
string(59) "私はガラスを食べられますreaddir_variation62.tmp"
79
91
string(59) "私はガラスを食べられますreaddir_variation63.tmp"
92
+
93
+ Deprecated: closedir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ closedir();
55
55
$ dir_path = __DIR__ . "/readdir_variation6 " ;
56
56
rmdir ($ dir_path );
57
57
?>
58
- --EXPECT --
58
+ --EXPECTF --
59
59
*** Testing readdir() : usage variations ***
60
60
61
61
-- Reading Directory Contents with Previous Handle --
@@ -66,8 +66,22 @@ string(23) "readdir_variation62.tmp"
66
66
string(23) "readdir_variation63.tmp"
67
67
68
68
-- Reading Directory Contents with Current Handle (no arguments supplied) --
69
+
70
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
71
+
72
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
73
+
74
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
75
+
76
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
77
+
78
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
79
+
80
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
69
81
string(1) "."
70
82
string(2) ".."
71
83
string(23) "readdir_variation61.tmp"
72
84
string(23) "readdir_variation62.tmp"
73
85
string(23) "readdir_variation63.tmp"
86
+
87
+ Deprecated: closedir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
Original file line number Diff line number Diff line change 82
82
bool(true)
83
83
84
84
-- Read and rewind second directory (no argument supplied) --
85
+
86
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
87
+
88
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
89
+
90
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
91
+
92
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
85
93
array(3) {
86
94
[0]=>
87
95
string(1) "."
@@ -90,5 +98,9 @@ array(3) {
90
98
[2]=>
91
99
string(45) "私はガラスを食べられますfile2.tmp"
92
100
}
101
+
102
+ Deprecated: rewinddir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
93
103
NULL
104
+
105
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
94
106
bool(true)
Original file line number Diff line number Diff line change 76
76
bool(true)
77
77
78
78
-- Read and rewind second directory (no argument supplied) --
79
+
80
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
81
+
82
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
83
+
84
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
85
+
86
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
79
87
array(3) {
80
88
[0]=>
81
89
string(1) "."
@@ -84,5 +92,9 @@ array(3) {
84
92
[2]=>
85
93
string(9) "file2.tmp"
86
94
}
95
+
96
+ Deprecated: rewinddir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
87
97
NULL
98
+
99
+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
88
100
bool(true)
You can’t perform that action at this time.
0 commit comments