php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76974 file_exists() resolves "/existing/path/////"
Submitted: 2018-10-05 00:19 UTC Modified: 2018-10-05 01:04 UTC
From: bendietze at yahoo dot de Assigned:
Status: Not a bug Package: Filesystem function related
PHP Version: 7.2.10 OS: PHP 7.2.10-0ubuntu0.18.04.1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
13 + 27 = ?
Subscribe to this entry?

 
 [2018-10-05 00:19 UTC] bendietze at yahoo dot de
Description:
------------
if (file_exists("/existing/path/////")) echo "why that?";
But only with a existing path! before ///


Test script:
---------------
if (file_exists("/existing/path/////")) echo "// is equal to ////////// and all together true";



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-10-05 00:24 UTC] requinix@php.net
-Status: Open +Status: Not a bug
 [2018-10-05 00:24 UTC] requinix@php.net
Because Linux doesn't care about repeated slashes.
 [2018-10-05 00:25 UTC] Wes dot example at example dot org
That is how paths work. Contiguous / are interpreted as one
 [2018-10-05 01:04 UTC] bendietze at yahoo dot de
OMG 10 years ago. Sorry
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 05:01:28 2024 UTC