• Georgi Bogdanov

    (@jorobogdanov)


    Hi,

    I want to report a problem that occurred to one website that I’m working on.

    In the function get_link_attributes in class-yith-wcan-navigation-widget.php on line 651 sometimes the while loop is creating an infinite loop. Can you please add a fix to this problem in the next update.

    Here is the workaround fix that I’ve:

    // Exclude query arg for current term archive term.
    $i = 0;
    while ( $in_array_function( $term->slug, $data['terms'] ) ) {
    $key = array_search( $current_term, $data );
    if ( $key ) {
    unset( $data['terms'][ $key ] );
    }
    if ($i >= 100) break;
    }
Viewing 1 replies (of 1 total)
  • Plugin Support crodriguez1991

    (@crodriguez1991)

    Hello there,

    I hope you’re doing well :D.

    I checked your code but I cannot see where the $i is changed in your code.

    Probably you missed to add the condition when the $i is increased.

    Anyway, could you send me a page of your site where I can reproduce the infinite loop? The code have a while where it should exclude the query arg for the current term archive.

    I’m looking forward your response.

    Have a good day.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.