PDA

View Full Version : AWS Problems



ozgression
10-10-2004, 04:16 PM
Hi, on a new site i'm making I get this error on the catergory pages:

Warning: Invalid argument supplied for foreach() in /home/wirephon/public_html/att-wireless-phones on line 66
Page 1 of 0

Anybody know what the problem is and how to fix it? I'm using the AWS script from WebsitePublisher.

Cheers...
________
medical marijuana (http://medicalmarijuanacard.info)

Emancipator
10-10-2004, 04:18 PM
can you share your code? specially the entire foreach loop and the bit where you are grabbing the xml feed. You are probably trying to grab an array that doesnt exist.

Chris
10-10-2004, 04:35 PM
Maybe you're not supplying an array....

Emancipator
10-10-2004, 05:57 PM
exactly what i say :) Happy to help you.. just share your code.. I have made many a typo in my code and had the same problem.

alien
10-10-2004, 06:11 PM
Do a if-else test for is_array() for that input parameter..

ozgression
10-10-2004, 06:24 PM
<edit>

Got it working

</edit>
________
Ford York engine (http://www.ford-wiki.com/wiki/Ford_York_engine)

alien
10-10-2004, 06:56 PM
Because there were no exact matches for the search.

Add the following before the "foreach ($items as $i)":

if (!is_array($items)) { exit(); }

Replace the exit() with a customized page for nicer output than simply exit everything..

ozgression
10-10-2004, 07:09 PM
Got it working... I was using the wrong browsenode.
________
genetically modified food (http://gmfoods.info/)