Make WordPress Core


Ignore:
Timestamp:
05/17/2023 10:44:21 PM (21 months 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/pluggable/wpMail.php

    r55087 r55822  
    539539     */
    540540    public function test_wp_mail_resets_properties() {
    541         $wp_mail_set_text_message = function ( $phpmailer ) {
     541        $wp_mail_set_text_message = static function ( $phpmailer ) {
    542542            $phpmailer->AltBody = 'user1';
    543543        };
Note: See TracChangeset for help on using the changeset viewer.