mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
General: Use static on closures whenever $this is not used to avoid memory leaks.
Props westonruter, jrf, spacedmonkey. Fixes #58323. git-svn-id: https://develop.svn.wordpress.org/trunk@55822 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -4826,7 +4826,7 @@ class WP_Query {
|
||||
* $value is passed by reference to allow it to be modified.
|
||||
* array_walk_recursive() does not return an array.
|
||||
*/
|
||||
function ( &$value ) use ( $wpdb, $placeholder ) {
|
||||
static function ( &$value ) use ( $wpdb, $placeholder ) {
|
||||
if ( is_string( $value ) && str_contains( $value, $placeholder ) ) {
|
||||
$value = $wpdb->remove_placeholder_escape( $value );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user