PHP 4.0 Bug #8079 Updated: warning: unknown filetype...
| From: | stas@php.net | Date: | Sun, 03 Dec 2000 13:44:14 +0000 |
| Subject: | PHP 4.0 Bug #8079 Updated: warning: unknown filetype... | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-39904@lists.php.net to get a copy of this message | ||
ID: 8079
Updated by: stas
Reported By: juker@gmx.de
Status: Closed
Bug Type: Filesystem function related
Assigned To:
Comments:
Fixed in CVS.
Previous Comments:
---------------------------------------------------------------------------
[2000-12-02 10:31:05] juker@gmx.de
When I run the filetype()-function on a unix-socket, my php 4.0.3 drops a warning like:
<b>Warning: Unknown file type (49152) in /home/path/test.php on line 7</b>
A good example to reproduce this behaviour is a 'echo filetype("/dev/log");',
where I would expect a result like "socket", but I get a "unknown" and the
warning.
I include a short script which dumps the contents of a directory and calls the filetype-function on
every found entry. When I run the script on /dev I get two warnings.
------------- test.php -------------------
<pre>
<?
$d = "/dev"; // dir to show
$h = opendir($d);
while($e = readdir($h))
{
echo filetype("$d/$e");
echo " ";
echo htmlentities($e);
echo "<br>n";
}
closedir($h);
?>
</pre>
------------------------------------------
yours, juker
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=8079