error on site – Warning: in_array() expects parameter 2 to be array, null given
-
This is the full error message:
Warning: in_array() expects parameter 2 to be array, null given in /home/mjrphoto/public_html/wp-includes/post-template.php on line 1059
I have narrowed it down to an issue between the theme and e-commerce plugin.
I am using Envisioned theme by Elegant Themes and Marketpress shopping cart.
The plugin support says to talk to the Theme support and the theme support says to talk to the plugin support.
the error only shows up on the product pages —
this is the code in post-template.php
1057 if ( !empty($current_page) ) { 1058 $_current_page = get_post( $current_page ); 1059 if ( in_array( $page->ID, $_current_page->ancestors ) ) 1060 $css_class[] = 'current_page_ancestor'; 1061 if ( $page->ID == $current_page ) 1062 $css_class[] = 'current_page_item'; 1063 elseif ( $_current_page && $page->ID == $_current_page->post_parent ) 1064 $css_class[] = 'current_page_parent'; 1065 } elseif ( $page->ID == get_option('page_for_posts') ) { 1066 $css_class[] = 'current_page_parent'; 1067 }
this is a link to one of the pages with the error on it:
https://mjrphotographyct.com/store/products/category/simsbury-basketball/does anyone have any thoughts or suggestions on what I need to do to fix this?
Thank you!!
- The topic ‘error on site – Warning: in_array() expects parameter 2 to be array, null given’ is closed to new replies.