I will give $5 for a small WP mistake

Status
Not open for further replies.

DemmyCool

Junior Member
Joined
Apr 13, 2014
Messages
156
Reaction score
120
Hello guys. Anyone around knows PHP? I'm getting this error message at a wordpress site. Has anyone any clue how to fix this?
afqzd17


The code for the corresponding file is this:
Code:
if ( ! function_exists( 'woo_get_query_context' ) ) {
    function woo_get_query_context() {
        global $wp_query, $query_context;
        
        /* If $query_context->context has been set, don't run through the conditionals again. Just return the variable. */
        if ( isset( $query_context->context ) && is_array( $query_context->context ) ) {
        
            return $query_context->context;
        
        } // End IF Statement
        
        $query_context->context = array();
    
        /* Front page of the site. */
        if ( is_front_page() ) {
        
            $query_context->context[] = 'home';
            
        } // End IF Statement
whereas line 160 is this: $query_context->context = array();

Can someone be gentle enough to tell me how to Fix this?
I can pay only through Paypal (to the first one that finds the solution). Regards.
 

Attachments

  • Website_Error.jpg
    Website_Error.jpg
    4.2 KB · Views: 3
add this before your line 160:

Code:
$query_context = new stdClass();

LMK if this has helped ;)
 
Last edited:
add this before your line 160:

Code:
$query_context = new stdClass();

LMK if this has helped ;)

Hey, you are Good and Fast! Please send me your Paypal e-mail. Regards.
 
Status
Not open for further replies.
This thread has been auto closed due to the forum's thread age policy. Read more.
Back
Top