WordPress.org

Make WordPress Core

Changeset 49185


Ignore:
Timestamp:
10/17/2020 04:34:45 PM (8 days ago)
Author:
SergeyBiryukov
Message:

Revisions: Explicitly declare the Text_Diff::_getTempDir() method as static.

This fixes a "Non-static method cannot be called statically" fatal error on PHP 8.

Props jrf.
Fixes #51559.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/Text/Diff.php

    r49120 r49185  
    221221     * Determines the location of the system temporary directory.
    222222     *
    223      * @static
    224      *
    225223     * @access protected
    226224     *
     
    228226     *                 Returns false if one could not be found.
    229227     */
    230     function _getTempDir()
     228    static function _getTempDir()
    231229    {
    232230        $tmp_locations = array('/tmp', '/var/tmp', 'c:\WUTemp', 'c:\temp',
Note: See TracChangeset for help on using the changeset viewer.