mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-04 14:47:02 +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:
@@ -136,7 +136,7 @@ class Tests_Query_Stickies extends WP_UnitTestCase {
|
||||
$post_ids = self::factory()->post->create_many( $sticky_count, array( 'post_date' => $post_date ) );
|
||||
add_filter(
|
||||
'pre_option_sticky_posts',
|
||||
function () use ( $post_ids ) {
|
||||
static function () use ( $post_ids ) {
|
||||
return $post_ids;
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user