Bug #80155 [NEW]: basename("/tmp","tmp") fails

From: Date: Sun, 27 Sep 2020 11:43:38 +0000
Subject: Bug #80155 [NEW]: basename("/tmp","tmp") fails
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229232@lists.php.net to get a copy of this message
From: divinity76 at gmail dot com Operating system: both Windows and Linux PHP version: 7.4.10 Package: *Directory/Filesystem functions Bug Type: Bug Bug description:basename("/tmp","tmp") fails Description: ------------ running basename("/tmp","tmp") fails to remove the "tmp" suffix from the end of the name. tested on PHP 8.0.0 beta3 running on Linux, and PHP 7.3.7 running on Windows 10. Test script: --------------- <?php var_dump(basename("/tmp","mp")); var_dump(basename("/tmp","tmp")); Expected result: ---------------- string(1) "t" string(0) "" Actual result: -------------- string(1) "t" string(3) "tmp" -- Edit bug report at https://bugs.php.net/bug.php?id=80155&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80155&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80155&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80155&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80155&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80155&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80155&r=support Expected behavior: https://bugs.php.net/fix.php?id=80155&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80155&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80155&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80155&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80155&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80155&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80155&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80155&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80155&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80155&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80155&r=mysqlcfg

« previous php.bugs (#229232) next »