Page 1 of 1

Invalid argument supplied for foreach()

Posted: 17 Aug 2011, 23:16
by zszalma
Phoca Gallery version 2.8.0, Joomla 1.5.23 Virtuemart 1.1.7

I created menu link as described in https://www.phoca.cz/documents/14-phoca- ... gin/97-faq
Activated Phoca Gallery Plugin.

Created category with id=1, and upload 3 photos in this category.

In an article in Joomla 1.5 write this line:

Code: Select all

{phocagallery view=categories|imagecategories=1|imagecategoriessize=1|hidecategories=1}
The same line appears in frontend instead of images.


Got Warning message:
Warning: Invalid argument supplied for foreach() in E:\FEJL\www\kutyaseta_88\htdocs\plugins\content\phocagallery.php on line 740

This line is:

Code: Select all

foreach ($data_outcome_array as $category)
var_dump($data_outcome_array) says:
string '' (length=0)

I have debugging turned on with PHP XDEBUG plugin.
Debug output is:

Code: Select all

Call Stack
#	Time	Memory	Function	Location
1	0.0014	85144	{main}( )	..\index.php:0
2	0.2436	6907984	JSite->dispatch( )	..\index.php:68
3	0.2494	7157688	JComponentHelper->renderComponent( )	..\application.php:124
4	0.2521	7278104	require_once( 'E:\FEJL\www\kutyaseta_88\htdocs\components\com_virtuemart\virtuemart.php' )	..\helper.php:162
5	0.3713	11741104	include( 'E:\FEJL\www\kutyaseta_88\htdocs\administrator\components\com_virtuemart\html\shop.browse.php' )	..\virtuemart.php:180
6	0.4265	15344376	vmCommonHTML->ParseContentByPlugins( )	..\shop.browse.php:86
7	0.4608	16260016	JDispatcher->trigger( )	..\htmlTools.class.php:1120
8	0.4610	16261648	JEvent->update( )	..\dispatcher.php:170
9	0.4610	16262448	call_user_func_array ( )	..\event.php:67
10	0.4610	16262664	plgContentPhocaGallery->onPrepareContent( )	..\event.php:67 

Any help would welcome. Many thanks.

Re: Invalid argument supplied for foreach()

Posted: 17 Aug 2011, 23:37
by zszalma
Phoca Gallery plugin version is 2.7.7.
(component is version 2.8.0)

Re: Invalid argument supplied for foreach()

Posted: 20 Aug 2011, 22:58
by Jan
Hi, enable debug mode (in global configuration of Joomla!) which then says more about the problem in the database.

Jan