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/general/wpPreloadResources.php

    r53849 r55822  
    1515     */
    1616    public function test_preload_resources( $expected, $preload_resources ) {
    17         $callback = function () use ( $preload_resources ) {
     17        $callback = static function () use ( $preload_resources ) {
    1818            return $preload_resources;
    1919        };
Note: See TracChangeset for help on using the changeset viewer.