Skip to:
Content

bbPress.org


Ignore:
Timestamp:
08/03/2020 01:33:59 PM (4 months ago)
Author:
xknown
Message:

PHP 7.4 Compat: Remove the create_function calls.

They are deprecated, and they seem to be removed in PHP 8.0.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1/search.php

    r2449 r7111  
    1111   
    1212    /* Recent */
    13     add_filter( 'bb_recent_search_fields',   create_function( '$f', 'return $f . ", MAX(post_time) AS post_time";' ) );
    14     add_filter( 'bb_recent_search_group_by', create_function( '', 'return "t.topic_id";' ) );
     13    add_filter( 'bb_recent_search_fields',   function( $f ) { return $f . ", MAX(post_time) AS post_time"; } );
     14    add_filter( 'bb_recent_search_group_by', function() { return "t.topic_id"; } );
    1515    $bb_query_form->BB_Query_Form( 'post', array(), array( 'order_by' => 'p.post_time', 'count' => true, 'per_page' => $per_page, 'post_status' => 0, 'topic_status' => 0, 'post_text' => $q, 'forum_id', 'tag', 'topic_author', 'post_author' ), 'bb_recent_search' );
    1616    $recent = $bb_query_form->results;
Note: See TracChangeset for help on using the changeset viewer.