Title: Infinite loop problem
Last modified: June 29, 2024

---

# Infinite loop problem

 *  [Georgi Bogdanov](https://wordpress.org/support/users/jorobogdanov/)
 * (@jorobogdanov)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/infinite-loop-problem-4/)
 * 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:
 *     ```wp-block-code
       // 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)

 *  [crodriguez1991](https://wordpress.org/support/users/crodriguez1991/)
 * (@crodriguez1991)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/infinite-loop-problem-4/#post-17863413)
 * 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)

The topic ‘Infinite loop problem’ is closed to new replies.

 * ![](https://ps.w.org/yith-woocommerce-ajax-navigation/assets/icon-256x256.gif?
   rev=3129944)
 * [YITH WooCommerce Ajax Product Filter](https://wordpress.org/plugins/yith-woocommerce-ajax-navigation/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yith-woocommerce-ajax-navigation/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yith-woocommerce-ajax-navigation/)
 * [Active Topics](https://wordpress.org/support/plugin/yith-woocommerce-ajax-navigation/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yith-woocommerce-ajax-navigation/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yith-woocommerce-ajax-navigation/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [crodriguez1991](https://wordpress.org/support/users/crodriguez1991/)
 * Last activity: [1 year, 11 months ago](https://wordpress.org/support/topic/infinite-loop-problem-4/#post-17863413)
 * Status: not resolved