1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I will give $5 for a small WP mistake

Discussion in 'Hire a Freelancer' started by DemmyCool, Jun 19, 2015.

  1. DemmyCool

    DemmyCool Junior Member

    Joined:
    Apr 13, 2014
    Messages:
    148
    Likes Received:
    117
    Hello guys. Anyone around knows PHP? I'm getting this error message at a wordpress site. Has anyone any clue how to fix this?
    [​IMG]

    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.
     

    Attached Files:

  2. ralphnsk

    ralphnsk Newbie

    Joined:
    Nov 2, 2009
    Messages:
    40
    Likes Received:
    13
    Gender:
    Male
    Location:
    /dev/random
    add this before your line 160:

    Code:
    $query_context = new stdClass();
    LMK if this has helped ;)
     
    Last edited: Jun 19, 2015
  3. DemmyCool

    DemmyCool Junior Member

    Joined:
    Apr 13, 2014
    Messages:
    148
    Likes Received:
    117
    Hey, you are Good and Fast! Please send me your Paypal e-mail. Regards.