Changes between Version 2 and Version 3 of Ticket #39338, comment 52
- Timestamp:
- 01/21/2019 12:40:19 AM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #39338, comment 52
v2 v3 4 4 5 5 I tried to apply your fix however the infinitive loop still came back with a slightly different error:\\ 6 PHP Warning: next() expects parameter 1 to be array, boolean given, ...\\7 PHP Warning: current() expects parameter 1 to be array, ...\\ 6 ''PHP Warning: next() expects parameter 1 to be array, boolean given, ...\\ 7 PHP Warning: current() expects parameter 1 to be array, ...\\'' 8 8 9 9 So i have modified the fix to use is_array instead of !is_null and it covers both NULL and boolean issues. I have 2 different versions of Wordpress to manage and there are different php files to modify based on error details: 10 10 11 - Wordpress v4.9.9 (recent version, and fix all similar while loops) 12 Fix class-wp-hook.phpin wp-includes folder (fix all similar while loops)\\11 Wordpress v4.9.9 (recent version, and fix all similar while loops)\\ 12 Fix **class-wp-hook.php** in wp-includes folder (fix all similar while loops)\\ 13 13 14 {{{#!php 15 <?php 14 16 } while ( is_array( $this->iterations[ $nesting_level ] ) && false !== next( $this->iterations[ $nesting_level ] ) ); 17 }}} 15 18 16 - Wordpress v4.6.1 17 Fix plugin.php in wp-includes folder (fix all similar while loops)\\ 19 Wordpress v4.6.1\\ 20 Fix **plugin.php** in wp-includes folder (fix all similar while loops)\\ 21 {{{#!php 22 <?php 18 23 } while (is_array($wp_filter[$tag]) && next($wp_filter[$tag]) !== false ); 24 }}} 25 19 26 20 27 I hope this will help someone. Cheers