Bug #78634 [NEW]: realpath function does not return false
| From: | flandrestudio dot cn at gmail dot com | Date: | Fri, 04 Oct 2019 14:45:43 +0000 |
| Subject: | Bug #78634 [NEW]: realpath function does not return false | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-223083@lists.php.net to get a copy of this message | ||
From: flandrestudio dot cn at gmail dot com
Operating system: Windows 10.0.18362
PHP version: 7.3.10
Package: *Directory/Filesystem functions
Bug Type: Bug
Bug description:realpath function does not return false
Description:
------------
In the case of deleting the directory without using the php function
rmdir (such as using the command line to delete), using realpath again
will not return false. The problem was not generated in php7.3.9.
å¨ä¸ä½¿ç¨php彿°rmdirå é¤ç®å½çæ
åµä¸(å¦ä½¿ç¨å½ä»¤è¡å é¤)
忬¡ä½¿ç¨realpathå°ä¸ä¼è¿åfalseãå¨php7.3.9æªäº§ç该é®é¢ã
Test script:
---------------
<?php
var_dump(phpversion());
$a = 'eee';
$path = dirname(__FILE__) . DIRECTORY_SEPARATOR . $a;
// ------------------
var_dump($path);
// ------------------
mkdir($path);
var_dump(realpath($path));
// ------------------
passthru('rd "' . $path . '"');
var_dump(realpath($path));
Expected result:
----------------
string(5) "7.3.9"
string(24) "E:\phpProject\xlbook\eee"
string(24) "E:\phpProject\xlbook\eee"
bool(false)
Actual result:
--------------
string(6) "7.3.10"
string(24) "E:\phpProject\xlbook\eee"
string(24) "E:\phpProject\xlbook\eee"
string(24) "E:\phpProject\xlbook\eee"
--
Edit bug report at https://bugs.php.net/bug.php?id=78634&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=78634&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78634&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78634&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78634&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78634&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78634&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78634&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78634&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78634&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78634&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=78634&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=78634&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78634&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78634&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78634&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78634&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78634&r=mysqlcfg