Make WordPress Core

Ticket #51559: 51559.patch

File 51559.patch, 1.1 KB (added by jrf, 4 years ago)
  • src/wp-includes/Text/Diff.php

    From 092e3c873e31e2b54cb4514f4bb6ee0f93ed4cac Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Sat, 17 Oct 2020 17:40:17 +0200
    Subject: [PATCH] PHP 8.0: fix fatal error "Non-static method cannot be called
     statically"
    
    ---
     src/wp-includes/Text/Diff.php | 4 +---
     1 file changed, 1 insertion(+), 3 deletions(-)
    
    diff --git a/src/wp-includes/Text/Diff.php b/src/wp-includes/Text/Diff.php
    index f9452f2600..ab1c9a26dd 100644
    a b class Text_Diff { 
    220220    /**
    221221     * Determines the location of the system temporary directory.
    222222     *
    223      * @static
    224      *
    225223     * @access protected
    226224     *
    227225     * @return string  A directory name which can be used for temp files.
    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',
    233231                               'c:\windows\temp', 'c:\winnt\temp');