Conversation
supportPHP 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?
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 7 years, 3 months ago by Preliot . This reply was modified 7 years, 3 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
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 7 years, 3 months ago by Preliot . This reply was modified 7 years, 3 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