Please submit a private ticket if you need to share sensitive information, such as license details and admin credentials.

Okay
  Public Ticket #3524073
WPC Smart Attribute Groups prints PHP error "Trying to access array offset on value of type null​".
Open

Comments

  • Panagiotis Papadopoulos started the conversation

    In the WPC Smart Attribute Groups plugin, version 1.0.2:

    The function parse_term_query in the class-backend.php does not check if the value is NULL before trying to access the array in line 234:

            $taxonomy = $query->query_vars['taxonomy'][0];

    This results in a PHP error being written on our site, along the lines of:
    "Trying to access array offset on value of type null".


    I solved the issue locally for now by adding the following check before and returning from the function early, if the query is NULL, like so:

            if (!isset($query->query_vars['taxonomy'])) {
                return;
            }
               
            $taxonomy = $query->query_vars['taxonomy'][0];


    Would be of course better, if you could fix this in the plugin itself.

    Thank you in advance!

  •  767
    Janilyn replied

    Hi Paragiotis,

    Thank you for contacting WPClever Support Forum. 

    We’ve received your ticket and assigned one of our developers to help you with that. He’ll be looking into your issue and responding as soon as finding a solution. 

    Please stay patient as we're having very heavy workloads, it might take some time for our developers to reach back.

    Best regards.

    Janilyn T. - WPClever Support Agent