Skip to:
Content

bbPress.org


Ignore:
Timestamp:
08/10/2020 07:51:23 PM (4 years ago)
Author:
xknown
Message:

PHP 7.4 Compat: Replace the deprecated create_function calls with anonymous functions.

File:
1 edited

Legend:

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

    r7115 r7116  
    10091009        $user_id = bb_get_current_user_info( 'id' );
    10101010        if ( isset($topic->bozos[$user_id]) && 'all' != @$_GET['view'] )
    1011             add_filter('get_topic_deleted_posts', create_function('$a', "\$a -= {$topic->bozos[$user_id]}; return \$a;") );
     1011            add_filter('get_topic_deleted_posts', function ( $a ) use ( $topic, $user_id ) { $a -= $topic->bozos[$user_id]; return $a; } );
    10121012        if ( $deleted = get_topic_deleted_posts( $id ) ) {
    10131013            $extra = sprintf(__('+%d more'), $deleted);
Note: See TracChangeset for help on using the changeset viewer.