Skip to:
Content

bbPress.org


Ignore:
Timestamp:
08/03/2020 01:20:09 PM (3 years ago)
Author:
xknown
Message:

PHP 7.4 Compat: Use square brackets and remove create_function calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.1/topic.php

    r2147 r7110  
    1515
    1616if ( $view_deleted ) {
    17     add_filter('get_thread_where', create_function('', 'return "p.topic_id = ' . $topic_id . '";'));
    18     add_filter('get_thread_post_ids', create_function('', 'return "p.topic_id = ' . $topic_id . '";'));
     17    add_filter('get_thread_where', function() use ($topic_id) { return "p.topic_id = " . intval( $topic_id ); });
     18    add_filter('get_thread_post_ids', function() use ($topic_id) { return "p.topic_id = " . intval( $topic_id ); });
    1919    add_filter('post_edit_uri', 'bb_make_link_view_all');
    2020}
Note: See TracChangeset for help on using the changeset viewer.