I have a PHP script for querying Amazon and displaying the results. It works fine on its own.
If i put it into a UDT it's unhappy until i move all the functions to the beginning of the script. Once i do that it mostly works except i get an error like this:
Code: Select all
Warning: Invalid argument supplied for foreach() in /home/test/public_html/lib/content.functions.php(771) : eval()'d code on line 166
Code: Select all
Warning: Invalid argument supplied for foreach() in /home/test/public_html/tmp/templates_c/%%06^065^065BC93F%%tpl_body%3A27.php on line 517
I'd be happy to solve this, but mostly i'd like to get a general handle on what i should or should not try to do with PHP inside of CMSMS, and what sort of guidelines i should follow. I put a lot of work into modifying this script, assuming that when i was done i'd just make a UDT and be done with it. Is that not a generally safe assumption?
Thanks,
-joe