Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




php error - known issue? workaround?

UserPost

1:44 pm
September 2, 2010


marfarma

New Member

posts 1

1

Role Groups ( add new · set defaults · browse members ) In the new group panel, between the add and the remove users boxes, the following php error appears.

( ! )  Warning: Invalid argument supplied for foreach() in /var/www/wp-content/plugins/role-scoper/admin/user_search_ui_rs.php on line 329
Call Stack
#	Time	Memory	Function	Location
1	0.0073	416104	{main}( )	../users.php:0
2	0.0091	534720	require_once( '/var/www/wp-admin/admin.php' )	../users.php:10
3	0.5822	31403408	do_action( )	../admin.php:138
4	0.5822	31406744	call_user_func_array ( )	../plugin.php:395
5	0.5822	31407184	ScoperAdmin->menu_handler( )	../plugin.php:0
6	0.5856	31696232	include_once( '/var/www/wp-content/plugins/role-scoper/admin/groups.php' )	../admin_rs.php:77
7	0.5914	31937600	ScoperUserSearch->output_html( )	../groups.php:431

Is this a known error? Is there a known workaround?

3:00 pm
September 2, 2010


Kevin

Admin

posts 2503

2

Try editing that file as follows:

change:

foreach ( $agents[ $this->status[0] ] as $value => $caption )
   if ( ( 'users' == $agent_type ) || ( in_array( $value, $editable_group_ids ) ) )
	echo "$caption";

to:

if ( ! empty($agents[ $this->status[0] ]) )
   foreach ( $agents[ $this->status[0] ] as $value => $caption )
	if ( ( 'users' == $agent_type ) || ( in_array( $value, $editable_group_ids ) ) )
	   echo "$caption";

About the Agapetry forum

Currently Online:

13 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1248

Posts: 5657

Members:

There are 1260 members

There are 1 guests


Kevin has made 2503 posts

Top Posters:

metal450 - 178

Ragnar - 108

YikYak - 70

whiteorb - 49

Daisy - 35

Administrator: Kevin | Moderators: Kevin