Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




Page parent problem

UserPost

7:30 am
March 31, 2011


ivanV

Member

posts 4

1

Hello, 

I have problem with my editor (user has page_editor capability for few categories), when he tries to update page with no parents everything is fine, but if page has parent i get this error:

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\HGK_MU\wp-content\plugins\role-scoper\query-interceptor_rs.php on line 914


Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\HGK_MU\wp-content\plugins\role-scoper\query-interceptor_rs.php on line 914


Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\HGK_MU\wp-content\plugins\role-scoper\query-interceptor_rs.php on line 914


Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\HGK_MU\wp-content\plugins\role-scoper\query-interceptor_rs.php on line 914


line 914 is: 

foreach ( $alternate_reqd_caps as $alternate_capset ) { 


I managed to find values of $alternate_reqd_caps that cause this error:

alternate_reqd_caps arg: s:18:"create_child_pages";

alternate_reqd_caps arg: s:18:"create_child_pages";

alternate_reqd_caps arg: s:18:"create_child_pages";

alternate_reqd_caps arg: s:18:"create_child_pages";


I fixed that by changing line 913 to:

if ( !empty($alternate_reqd_caps) && is_array($alternate_reqd_caps) ) {  


I'm using Role scoper 1.3.28 and wordpress 3.0.5

Thanks
Ivan


8:29 am
March 31, 2011


Kevin

Admin

posts 2503

2

Thanks for letting me know, but I don't see how that would happen with the released code and supported usage. Can you check your template functions and plugin code to see if you have any custom code passing alternate_reqd_caps? It should be a 2D array.

9:38 am
March 31, 2011


ivanV

Member

posts 4

3

I havent found "alternate_reqd_caps" in theme folder neither  in plugins folder(except in role-scoper).  Btw original log was(not sure if order is correct, i just filtered ones that cause problems):

alternate_reqd_caps arg: s:18:"create_child_pages";

alternate_reqd_caps arg: a:1:{i:0;s:18:"create_child_pages";}

alternate_reqd_caps arg: a:1:{i:0;s:18:"create_child_pages";}

alternate_reqd_caps arg: s:18:"create_child_pages";

alternate_reqd_caps arg: a:1:{i:0;s:18:"create_child_pages";}

alternate_reqd_caps arg: s:18:"create_child_pages";

alternate_reqd_caps arg: a:1:{i:0;s:18:"create_child_pages";}

alternate_reqd_caps arg: s:18:"create_child_pages";


1:40 pm
April 5, 2011


Kevin

Admin

posts 2503

4

I'll add the is_array() check as a precaution there until the cause of this is identified.


About the Agapetry forum

Currently Online:

14 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