Make WordPress Core


Ignore:
Timestamp:
05/17/2023 10:44:21 PM (3 years ago)
Author:
westonruter
Message:

General: Use static on closures whenever $this is not used to avoid memory leaks.

Props westonruter, jrf, spacedmonkey.
Fixes #58323.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/query/stickies.php

    r52990 r55822  
    137137        add_filter(
    138138            'pre_option_sticky_posts',
    139             function () use ( $post_ids ) {
     139            static function () use ( $post_ids ) {
    140140                return $post_ids;
    141141            }
Note: See TracChangeset for help on using the changeset viewer.