note 81327 added to function.closedir
| From: | lester dot katvirgin dot com at osu1 dot php dot net | Date: | Fri, 22 Feb 2008 18:27:52 +0000 |
| Subject: | note 81327 added to function.closedir | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-136412@lists.php.net to get a copy of this message | ||
The manual says that one should only call closedir with a parameter which is an open directory
handle.
The manual usually lists warnings and errors generated by violating a "should" or
"shouldn't", but doesn't for this case.
In fact, one gets the runtime error
Warning: closedir(): supplied argument is not a valid Directory resource in whatever.php on line
nn
irrespective of whether it's an already-closed directory handle or whether it's total
junk.
[Different error messages would have spared me a little debugging. Sigh. It would be nice if the
manual said.]
----
Server IP: 92.48.74.199
Probable Submitter: 86.31.63.240
----
Manual Page -- http://www.php.net/manual/en/function.closedir.php
Edit -- https://master.php.net/note/edit/81327
Del: integrated -- https://master.php.net/note/delete/81327/integrated
Del: useless -- https://master.php.net/note/delete/81327/useless
Del: bad code -- https://master.php.net/note/delete/81327/bad+code
Del: spam -- https://master.php.net/note/delete/81327/spam
Del: non-english -- https://master.php.net/note/delete/81327/non-english
Del: in docs -- https://master.php.net/note/delete/81327/in+docs
Del: other reasons-- https://master.php.net/note/delete/81327
Reject -- https://master.php.net/note/reject/81327
Search -- https://master.php.net/manage/user-notes.php