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)
160160static php_stream * php_dir_get_directory_stream_from_user_arg (php_stream * dir_stream )
161161{
162162 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" );
163165 if (UNEXPECTED (DIRG (default_dir ) == NULL )) {
164166 zend_type_error ("No resource supplied" );
165167 return NULL ;
Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ rmdir($dir_path);
4444*** Testing closedir() : basic functionality ***
4545
4646-- 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
4749NULL
4850-- Check Directory Handle: --
4951resource(%d) of type (Unknown)
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ rmdir($dir_path);
3838*** Testing closedir() : basic functionality ***
3939
4040-- 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
4143NULL
4244-- Check Directory Handle: --
4345resource(%d) of type (Unknown)
Original file line number Diff line number Diff line change 88 echo $ e ->getMessage (), "\n" ;
99}
1010?>
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
1213No resource supplied
Original file line number Diff line number Diff line change @@ -65,6 +65,18 @@ string(9) "file3.tmp"
6565
6666-- Call readdir() without $path argument --
6767resource(%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
6880string(1) "."
6981string(2) ".."
7082string(9) "file1.tmp"
Original file line number Diff line number Diff line change @@ -59,6 +59,18 @@ string(9) "file3.tmp"
5959
6060-- Call readdir() without $path argument --
6161resource(%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
6274string(1) "."
6375string(2) ".."
6476string(9) "file1.tmp"
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ closedir();
6161$ dir_path = __DIR__ . "/私はガラスを食べられますreaddir_variation6 " ;
6262rmdir ($ dir_path );
6363?>
64- --EXPECT --
64+ --EXPECTF --
6565*** Testing readdir() : usage variations ***
6666
6767-- Reading Directory Contents with Previous Handle --
@@ -72,8 +72,22 @@ string(59) "私はガラスを食べられますreaddir_variation62.tmp"
7272string(59) "私はガラスを食べられますreaddir_variation63.tmp"
7373
7474-- 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
7587string(1) "."
7688string(2) ".."
7789string(59) "私はガラスを食べられますreaddir_variation61.tmp"
7890string(59) "私はガラスを食べられますreaddir_variation62.tmp"
7991string(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();
5555$ dir_path = __DIR__ . "/readdir_variation6 " ;
5656rmdir ($ dir_path );
5757?>
58- --EXPECT --
58+ --EXPECTF --
5959*** Testing readdir() : usage variations ***
6060
6161-- Reading Directory Contents with Previous Handle --
@@ -66,8 +66,22 @@ string(23) "readdir_variation62.tmp"
6666string(23) "readdir_variation63.tmp"
6767
6868-- 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
6981string(1) "."
7082string(2) ".."
7183string(23) "readdir_variation61.tmp"
7284string(23) "readdir_variation62.tmp"
7385string(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 8282bool(true)
8383
8484-- 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
8593array(3) {
8694 [0]=>
8795 string(1) "."
@@ -90,5 +98,9 @@ array(3) {
9098 [2]=>
9199 string(45) "私はガラスを食べられますfile2.tmp"
92100}
101+
102+ Deprecated: rewinddir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
93103NULL
104+
105+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
94106bool(true)
Original file line number Diff line number Diff line change 7676bool(true)
7777
7878-- 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
7987array(3) {
8088 [0]=>
8189 string(1) "."
@@ -84,5 +92,9 @@ array(3) {
8492 [2]=>
8593 string(9) "file2.tmp"
8694}
95+
96+ Deprecated: rewinddir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
8797NULL
98+
99+ Deprecated: readdir(): Passing null is deprecated, instead the last opened directory stream should be provided in %s on line %d
88100bool(true)
You can’t perform that action at this time.
0 commit comments