[Tickets #11949] Re: PHP ERROR: Invalid argument supplied for foreach()
noreply at bugs.horde.org
noreply at bugs.horde.org
Fri Jan 11 12:59:23 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 | Unconfirmed
Priority | 1. Low
Milestone |
Patch | 1
Owners |
------------------------------------------------------------------------------
zdrahal at ipnp.troja.mff.cuni.cz (2013-01-11 12:58) wrote:
On two places of the code there is used foreach without checking
whether the argument is indeed an array. Depending on the system
configuration, it leads to the following errors:
PHP ERROR: Invalid argument supplied for foreach() [pid 10297 on line
59 of "/usr/share/php/Horde/Core/Db/Migration.php"]
PHP ERROR: Invalid argument supplied for foreach() [pid 10286 on line
203 of "/usr/share/php/Horde/Config.php"]
The solution is simple - in both cases just add the check whether the
variable is unempty and is an array.
zdrahal at ipnp.troja.mff.cuni.cz (2013-01-11 12:58) uploaded: Config.php.patch
http://bugs.horde.org/h/services/download/?module=whups&actionID=download_file&file=Config.php.patch&ticket=11949&fn=%2FConfig.php.patch
More information about the bugs
mailing list