Bug #76974 [Nab]: file_exists() resolves "/existing/path/////"

From: Date: Fri, 05 Oct 2018 01:04:34 +0000
Subject: Bug #76974 [Nab]: file_exists() resolves "/existing/path/////"
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-217426@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76974&edit=1 ID: 76974 User updated by: bendietze at yahoo dot de Reported by: bendietze at yahoo dot de Summary: file_exists() resolves "/existing/path/////" Status: Not a bug Type: Bug Package: Filesystem function related Operating System: PHP 7.2.10-0ubuntu0.18.04.1 PHP Version: 7.2.10 Block user comment: N Private report: N New Comment: OMG 10 years ago. Sorry Previous Comments: ------------------------------------------------------------------------ [2018-10-05 00:25:07] Wes dot example at example dot org That is how paths work. Contiguous / are interpreted as one ------------------------------------------------------------------------ [2018-10-05 00:24:35] requinix@php.net Because Linux doesn't care about repeated slashes. ------------------------------------------------------------------------ [2018-10-05 00:19:03] 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"; ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=76974&edit=1

« previous php.bugs (#217426) next »