Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #39338, comment 52


Ignore:
Timestamp:
01/21/2019 12:40:19 AM (6 years ago)
Author:
trongn
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #39338, comment 52

    v2 v3  
    44
    55I 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, ...\\
     7PHP Warning:  current() expects parameter 1 to be array, ...\\''
    88
    99So 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:
    1010
    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)\\
     11Wordpress v4.9.9 (recent version, and fix all similar while loops)\\
     12Fix **class-wp-hook.php** in wp-includes folder (fix all similar while loops)\\
    1313
     14{{{#!php
     15<?php
    1416} while ( is_array( $this->iterations[ $nesting_level ] ) && false !== next( $this->iterations[ $nesting_level ] ) );
     17}}}
    1518
    16 - Wordpress v4.6.1
    17 Fix plugin.php in wp-includes folder (fix all similar while loops)\\
     19Wordpress v4.6.1\\
     20Fix **plugin.php** in wp-includes folder (fix all similar while loops)\\
     21{{{#!php
     22<?php
    1823} while (is_array($wp_filter[$tag]) && next($wp_filter[$tag]) !== false );
     24}}}
     25
    1926
    2027I hope this will help someone. Cheers