#32856 [Opn->Bgs]: file(dir) returns array with 1 element containg dir-contents

From: Date: Wed, 27 Apr 2005 13:48:52 +0000
Subject: #32856 [Opn->Bgs]: file(dir) returns array with 1 element containg dir-contents
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-78297@lists.php.net to get a copy of this message
ID: 32856 Updated by: sniper@php.net Reported By: arjen at mediamonks dot com -Status: Open +Status: Bogus Bug Type: Filesystem function related Operating System: FreeBSD PHP Version: 5CVS-2005-04-27 (dev) New Comment: According to people who know FreeBSD better this is not a bug. It's just how FreeBSD works. Previous Comments: ------------------------------------------------------------------------ [2005-04-27 15:21:32] sniper@php.net Does NOT happen with Linux. ------------------------------------------------------------------------ [2005-04-27 15:08:01] arjen at mediamonks dot com Description: ------------ file('./'); returns an array with 1 element, containing a string which shows weird characters, but between those are some filenames of files in the directory. Reproduce code: --------------- var_dump(file('./')); Expected result: ---------------- Array(0) { } Actual result: -------------- array(1) { [0]=> string(512) " - lots of characters here - " } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32856&edit=1

« previous php.bugs (#78297) next »