Skip to:
Content

bbPress.org


Ignore:
Timestamp:
08/04/2020 11:29:34 AM (4 months ago)
Author:
xknown
Message:

PHP 7.4 compat: Replace the deprecated each call

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1/bb-includes/functions.bb-forums.php

    r6156 r7112  
    2121    reset($_leaves);
    2222
    23     while ( list($l, $leaf) = each($_leaves) ) {
     23    foreach ( $_leaves as $l => $leaf ) {
    2424        if ( $root == $leaf->forum_parent ) {
    2525            $new_root = (int) $leaf->forum_id;
    2626            unset($_leaves[$l]);
    2727            $branch[$new_root] = 1 == $depth ? true : bb_get_forums_hierarchical( $new_root, $depth - 1, false, true );
    28             reset($_leaves);
    2928        }
    3029    }
Note: See TracChangeset for help on using the changeset viewer.