• PHP Deprecated: Function create_function() is deprecated in /.../public_html/wp-content/plugins/search-everything/search-everything.php on line 236

    Will the plugin be updated anytime this year?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Tested my website with PHP 7.2 and also saw the same issue. This function is used in one place:

    search-everything.php > line 236

    
    $search_terms = array_filter(array_map( create_function( '$a', 'return trim($a, "\\"\'\\n\\r ");' ), $matches[0] ));
    

    Perhaps use an anonymous function?

    • This reply was modified 5 years, 9 months ago by Preliot.
    • This reply was modified 5 years, 9 months ago by Preliot.

    Fix (on your own risk). If you see an error, please comment here:

    //$search_terms = array_filter(array_map( create_function( '$a', 'return trim($a, "\\"\'\\n\\r ");' ), $matches[0] ));
    
    //Custom improvement
    $search_terms = array_filter(array_map( function($a) 
    {
        return trim($a, "\"'\n\r "); 
    }, $matches[0] ));

    Works for me! Thanks for the tip

    Yeah, that thing also works for me. Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP Deprecated: Function create_function() is deprecated in…’ is closed to new replies.