Skip to:
Content

bbPress.org


Ignore:
Timestamp:
08/10/2020 07:51:23 PM (4 months 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/search.php

    r2378 r7116  
    88
    99if ( $q = stripslashes( $q ) ) {
    10     add_filter( 'bb_recent_search_fields',   create_function( '$f', 'return $f . ", MAX(post_time) AS post_time";' ) );
    11     add_filter( 'bb_recent_search_group_by', create_function( '', 'return "t.topic_id";' ) );
     10    add_filter( 'bb_recent_search_fields',   function( $f ) { return $f . ", MAX(post_time) AS post_time"; } );
     11    add_filter( 'bb_recent_search_group_by', function() { return "t.topic_id"; } );
    1212    $bb_query_form->BB_Query_Form( 'post', array(), array( 'order_by' => 'p.post_time', 'per_page' => 5, 'post_status' => 0, 'topic_status' => 0, 'post_text' => $q, 'forum_id', 'tag', 'topic_author', 'post_author' ), 'bb_recent_search' );
    1313    $recent = $bb_query_form->results;
Note: See TracChangeset for help on using the changeset viewer.