Skip to:
Content

bbPress.org


Ignore:
Timestamp:
12/12/2016 01:59:44 PM (5 years ago)
Author:
xknown
Message:

Branch 0.9: Fix PHP 7 compat issues w.r.t. the use of func_get_arg() and PHP 5.x constructors.

  • func_get_arg() returns the current (modified) value of the given argument. Let's make sure the code behaves the same.
  • Add PHP 5.x style constructors.
  • Use preg_match instead of eregi

See #3033

File:
1 edited

Legend:

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

    r3517 r6160  
    6767
    6868function get_forums( $args = null ) {
     69    $_args = func_get_args();
    6970    if ( is_numeric($args) ) {
    7071        $args = array( 'child_of' => $args, 'hierarchical' => 1, 'depth' => 0 );
     
    7273        $args = array( 'callback' => $args );
    7374        if ( 1 < func_num_args() )
    74             $args['callback_args'] = func_get_arg(1);
     75            $args['callback_args'] = $_args[1];
    7576    }
    7677
Note: See TracChangeset for help on using the changeset viewer.