Skip to:
Content

bbPress.org


Ignore:
Timestamp:
08/10/2020 07:41:45 PM (3 years ago)
Author:
xknown
Message:

PHP 7.4 Compat: Remove deprecated functions.

File:
1 edited

Legend:

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

    r6160 r7114  
    4747    reset($_leaves);
    4848
    49     while ( list($l, $leaf) = each($_leaves) ) {
     49    foreach ( $_leaves as $l => $leaf ) {
    5050        if ( $root == $leaf->forum_parent ) {
    5151            $new_root = (int) $leaf->forum_id;
    5252            unset($_leaves[$l]);
    5353            $branch[$new_root] = 1 == $depth ? true : bb_get_forums_hierarchical( $new_root, $depth - 1, false, true );
    54             reset($_leaves);
    5554        }
    5655    }
     
    24272426    if (strpos($file, '#') !== false)
    24282427        return $file; // It's already a basename
    2429     foreach ($directories as $type => $directory)
     2428    foreach ($directories as $type => $directory) {
    24302429        if (strpos($file, $directory) !== false)
    24312430            break; // Keep the $file and $directory set and use them below, nifty huh?
     2431    }
    24322432    $file = str_replace('\\','/',$file);
    24332433    $file = preg_replace('|/+|','/', $file);
     
    24972497        if ( $themes_dir = @dir($theme_root) )
    24982498            while( ( $theme_dir = $themes_dir->read() ) !== false )
    2499                 if ( is_dir($theme_root . $theme_dir) && is_readable($theme_root . $theme_dir) && '.' != $theme_dir{0} )
     2499                if ( is_dir($theme_root . $theme_dir) && is_readable($theme_root . $theme_dir) && '.' != $theme_dir[0] )
    25002500                    $r[$theme_root_name . '#' . $theme_dir] = $theme_root_name . '#' . $theme_dir;
    25012501    ksort($r);
Note: See TracChangeset for help on using the changeset viewer.