[Tickets #11949] Re: PHP ERROR: Invalid argument supplied for foreach()
noreply at bugs.horde.org
noreply at bugs.horde.org
Tue Jan 15 16:13:25 UTC 2013
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/11949
------------------------------------------------------------------------------
Ticket | 11949
Updated By | zdrahal at ipnp.troja.mff.cuni.cz
Summary | PHP ERROR: Invalid argument supplied for foreach()
Queue | Horde Base
Version | 5.0.3
Type | Bug
State | Feedback
Priority | 1. Low
Milestone |
Patch | 1
Owners |
------------------------------------------------------------------------------
zdrahal at ipnp.troja.mff.cuni.cz (2013-01-15 16:13) wrote:
You are right, it is *supposed* to return an empty array. However, if
the openbasedir is activated, the glob function returns false instead
of an empty array. In the case some matching file exists, glob returns
a populated array regardless of the activation of the openbasedir.
See e.g.
http://stackoverflow.com/questions/9213249/behaviour-of-glob-function-in-php-is-different-with-open-basedir or
https://bugs.php.net/bug.php?id=47358
According to PHP guys, searching for a non-existent file in the case
openbasedir is activated should give an error and not the answer -
there is no file matching your search (empty array).
So the system configuration required for occurrence of this error is
non-existence of the files in the given directory and having
openbasedir activated.
More information about the bugs
mailing list