Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/13/2017 01:13:51 AM (4 years ago)
Author:
boonebgorges
Message:

Remove calls to create_function().

create_function() is deprecated in PHP 7.2.

See #7634.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/deprecated/1.6.php

    r10544 r11773  
    266266        // For each of the problematic hooks, exit at the very end of execution
    267267        foreach( $actions as $action ) {
    268             add_action( 'wp_ajax_'        . $action, create_function( '', 'exit;' ), 9999 );
    269             add_action( 'wp_ajax_nopriv_' . $action, create_function( '', 'exit;' ), 9999 );
     268            add_action( 'wp_ajax_' . $action, function() {
     269                exit;
     270            }, 9999 );
     271
     272            add_action( 'wp_ajax_nopriv_' . $action, function() {
     273                exit;
     274            }, 9999 );
    270275        }
    271276    }
Note: See TracChangeset for help on using the changeset viewer.