Edit report at https://bugs.php.net/bug.php?id=61586&edit=1
ID: 61586
Comment by: reeze dot xia at gmail dot com
Reported by: simon at cicoss dot net
Summary: is_file("path/.ext");
Status: Open
Type: Bug
Package: Filesystem function related
Operating System: Suse Linux
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Hi simon:
I don't get it. does it look like this?
./testscript.php
./path
/a.json <---- a.json or any *.json ?
file
cat testscript.php
<?php
$filename = "path/.json";
var_dump(is_file($filename)); ===> bool(true)
Previous Comments:
------------------------------------------------------------------------
[2012-03-31 19:57:59] simon at cicoss dot net
Description:
------------
---
>From manual page: http://www.php.net/function.is-file
---
Due to a small error I found that is_file returns true for something like
"path/.ext" when "path/" files there ".ext".
Test script:
---------------
<?php
$filename = "path/.json";
is_file($filename);true if there are files in path "*. json"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61586&edit=1