Skip to:
Content

bbPress.org

Changeset 7114


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

PHP 7.4 Compat: Remove deprecated functions.

Location:
branches/0.9/bb-includes
Files:
3 edited

Legend:

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

    r6171 r7114  
    10001000            if ( in_array($this->_current_file, array('.', '..')) )
    10011001                continue;
    1002             if ( !$this->dots && '.' == $this->_current_file{0} )
     1002            if ( !$this->dots && '.' == $this->_current_file[0] )
    10031003                continue;
    10041004
  • branches/0.9/bb-includes/db.php

    r1894 r7114  
    11<?php
    2 define('OBJECT', 'OBJECT', true);
    3 define('ARRAY_A', 'ARRAY_A', false);
    4 define('ARRAY_N', 'ARRAY_N', false);
     2define('OBJECT', 'OBJECT');
     3define('ARRAY_A', 'ARRAY_A');
     4define('ARRAY_N', 'ARRAY_N');
    55
    66if ( !defined('SAVEQUERIES') )
  • 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.