Skip to:
Content

bbPress.org


Ignore:
Timestamp:
01/03/2017 07:29:09 PM (7 years ago)
Author:
xknown
Message:

branch 0.9: Fix PHP 7 compat issues w.r.t. the use of func_get_arg().

func_get_arg() returns the current (modified) value of the given argument. Let's make sure the code behaves the same.
See #3033

File:
1 edited

Legend:

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

    r1335 r6206  
    464464    bb_log_deprecated('function', __FUNCTION__, 'bb_tag_heat_map (with variations to arguments)');
    465465    $defaults = array( 'smallest' => 8, 'largest' => 22, 'unit' => 'pt', 'limit' => 45, 'format' => 'flat' );
     466    $_args = func_get_args();
    466467    $args = wp_parse_args( $args, $defaults );
    467468
    468469    if ( 1 < $fn = func_num_args() ) : // For back compat
    469         $args['smallest'] = func_get_arg(0);
    470         $args['largest']  = func_get_arg(1);
    471         $args['unit']     = 2 < $fn ? func_get_arg(2) : $unit;
    472         $args['limit']    = 3 < $fn ? func_get_arg(3) : $limit;
     470        $args['smallest'] = $_args[0];
     471        $args['largest']  = $_args[1];
     472        $args['unit']     = 2 < $fn ? $_args[2] : $unit;
     473        $args['limit']    = 3 < $fn ? $_args[3] : $limit;
    473474    endif;
    474475
Note: See TracChangeset for help on using the changeset viewer.