Warning: Invalid argument supplied for foreach

Phoca Gallery plugins - plugins for Phoca Gallery extension
tvwe
Phoca Member
Phoca Member
Posts: 11
Joined: 02 Dec 2010, 15:05

Warning: Invalid argument supplied for foreach

Post by tvwe »

Hello.

I have 2 questions:

A: get this message: Warning: Invalid argument supplied for foreach() in C:\XAMPP\xampp\htdocs\J1.6\administrator\components\com_phocagallery\libraries\phocagallery\access\access.php on line 55

Code: Select all

		   // User ACL
		   $rightGroupAccess = 0;
		   // User can be assigned to different groups
This isline 55: foreach   ($userAID as $keyUserAID => $valueUserAID) {
		   if ((int)$rightGroup == (int)$valueUserAID) {
		   $rightGroupAccess = 1;
				break;
			}
		   }
A: How should I repair this error?

B: where can I chance the font color in the the breadcrumb navigation?
I have installed on localhost:

Joomla! 1,6.
Phoca Gallery version 3.0.0 RC.
Phoca Gallery Plugin.

Hope somone will help me.
Best regards.
tvwe.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Warning: Invalid argument supplied for foreach

Post by Jan »

Hi, try to download the plugin now and reinstall, this should be fixed and let me know.

Jan
If you find Phoca extensions useful, please support the project
tvwe
Phoca Member
Phoca Member
Posts: 11
Joined: 02 Dec 2010, 15:05

Re: Warning: Invalid argument supplied for foreach

Post by tvwe »

Hi Jan,

Thank you for your reaction and to customize the plugin, it works perfectly now, and it also shows a small thumbnail picture to see again. :twisted: :twisted: :twisted: :twisted:

Best regards.
tvwe. :twisted:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Warning: Invalid argument supplied for foreach

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
duportde
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 12 Apr 2011, 12:26

Re: Warning: Invalid argument supplied for foreach

Post by duportde »

Hello Jan,

I would like to know if there is a simple way to transform the Phocagallery Tree Plugin, so that it is compatible with Joomla 1.6 ?

In fact, the installation works good with the 1.5 version, but there are two issues that remain :

- No access to the parameters of the plugin in Joomla Administration

- One error in the frontend :

"Warning: Invalid argument supplied for foreach() in /home/administrator/components/com_phocagallery/libraries/phocagallery/access/access.php on line 53".

The line 53 is the following :
foreach ($userAID as $keyUserAID => $valueUserAID) {
if ((int)$rightGroup == (int)$valueUserAID) {
$rightGroupAccess = 1;
break;
}
}

Otherwise, the plugin works and shows what it should do...

Thank you in advance if you could help me to use the useful plugin in my Joomla 1.6 installation !
Kind regards,
Etienne
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Warning: Invalid argument supplied for foreach

Post by Jan »

Hi,

the following must be done:

- change some sql queries (to follow joomla 1.6 tables)
- change some code to everything is 1.6 ready
- make the translation in 1.6 format

All this I plan to do after Phoca Gallery will be stable, of course if someone will prepare it (right) so then the work will be easily (e.g. change the translation string to right format, etc.)

Jan
If you find Phoca extensions useful, please support the project
wayne
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 15 Aug 2013, 14:03

Re: Warning: Invalid argument supplied for foreach

Post by wayne »

Hi Jan

I started a new website on Joomla 2.5.14 and installed Phoca Gallery 3.2.6 as I have plans to make a slideshow banner. I keep getting errors everywhere in the extension, making it unusable.

In "multiple add": Warning: Invalid argument supplied for foreach() in /home/laserlip/public_html/libraries/joomla/database/database/mysql.php on line 383

In "Categories": Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in /home/laserlip/public_html/libraries/joomla/database/database/mysqli.php on line 263

In "Add new category": Warning: Invalid argument supplied for foreach() in /home/laserlip/public_html/libraries/joomla/database/database/mysql.php on line 383 (this one stops me from saving the new category)

Any help will be appreciated. Oh, and I'm using cpanel as a backend

Regards
Wayne
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Warning: Invalid argument supplied for foreach

Post by Jan »

If you find Phoca extensions useful, please support the project
wayne
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 15 Aug 2013, 14:03

Re: Warning: Invalid argument supplied for foreach

Post by wayne »

Hi Jan

Thanks for the reply. Is this a Phoca gallery issue or Joomla? I've used the Phoca gallery on all my sites and it worked fine, now I get this issue. I'm also not familiar with "phpMyAdmin" Is there a way to fix this problem, or do I have to use time to make all the folders manually?

I really love this extension and it works and looks great, but if I have to go through this setup everytime, I might not want to use the extension anymore :cry: :cry: :cry:

Thanks again for the assistance
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Warning: Invalid argument supplied for foreach

Post by Jan »

Hi, if the tables were not installed on your server, there can be more problems:

- Joomla! installation procedure didn't install them and as normally Joomla! install the tables (it takes the information from XML) this seems to be some kind of problem on server (e.g. there is some limitation or there was no time to run whole installation, etc.) I think you need to ask your webhosting provider :idea:

Jan
If you find Phoca extensions useful, please support the project
Post Reply