Re: Invalid argument supplied for foreach()
| From: | David Robley | Date: | Tue, 20 Dec 2005 01:20:38 +0000 |
| Subject: | Re: Invalid argument supplied for foreach() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-227692@lists.php.net to get a copy of this message | ||
Jose Borquez wrote:
> I am getting the following errors when accessing a php page:
>
> /usr/local/www/groupoffice-com-2.14-FINAL-4/configuration/index.php(299)
> : Warni
> ng - Invalid argument supplied for foreach()
> [Mon Dec 19 15:10:52 2005] [error] PHP Warning: Invalid argument
> supplied for f
> oreach() in
> /usr/local/www/groupoffice-com-2.14-FINAL-4/configuration/index.php
> on line 299
>
> I solved previous php error problem by installing the php5-extensions,
> but now I am getting the following errors in my log files and I have no
> idea what it could be. Any help would be greatly appreciated.
>
> Thanks in advance,
> Jose
foreach expects to have an array passed as its argument; the error message
suggests that what it is receiving is not an array. Without seeing your
code, the only suggestion we could make (well, me anyway) is to check what
is actually being passed, with print_r or var_dump.
Cheers
--
David Robley
Support bacteria - it's the only culture some people have!