note 102691 added to function.glob

From: Date: Tue, 01 Mar 2011 05:50:54 +0000
Subject: note 102691 added to function.glob
Groups: php.notes 
Request: Send a blank email to php-notes+get-177425@lists.php.net to get a copy of this message
If you have open_basedir set in php.ini to limit which files php can execute, glob(...) will return false when there are no matching files. If open_basedir is not set, the very same code will return an empty array in the same situation. This is unfortunate as a seemingly innocuous change causes different functionality that breaks code like: foreach(glob("*.ext") as $file) ... See this link if you have any questions as to why this is so: http://bugs.php.net/bug.php?id=47358 ---- Server IP: 69.147.83.197 Probable Submitter: 68.3.48.236 ---- Manual Page -- http://www.php.net/manual/en/function.glob.php Edit -- https://master.php.net/note/edit/102691 Del: integrated -- https://master.php.net/note/delete/102691/integrated Del: useless -- https://master.php.net/note/delete/102691/useless Del: bad code -- https://master.php.net/note/delete/102691/bad+code Del: spam -- https://master.php.net/note/delete/102691/spam Del: non-english -- https://master.php.net/note/delete/102691/non-english Del: in docs -- https://master.php.net/note/delete/102691/in+docs Del: other reasons-- https://master.php.net/note/delete/102691 Reject -- https://master.php.net/note/reject/102691 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#177425) next »