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.

git-svn-id: https://develop.svn.wordpress.org/trunk@49185 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2020-10-17 16:34:45 +00:00
parent 5bad4e7f8d
commit 2c25a1a0ca

View File

@ -220,14 +220,12 @@ class Text_Diff {
/** /**
* Determines the location of the system temporary directory. * Determines the location of the system temporary directory.
* *
* @static
*
* @access protected * @access protected
* *
* @return string A directory name which can be used for temp files. * @return string A directory name which can be used for temp files.
* Returns false if one could not be found. * Returns false if one could not be found.
*/ */
function _getTempDir() static function _getTempDir()
{ {
$tmp_locations = array('/tmp', '/var/tmp', 'c:\WUTemp', 'c:\temp', $tmp_locations = array('/tmp', '/var/tmp', 'c:\WUTemp', 'c:\temp',
'c:\windows\temp', 'c:\winnt\temp'); 'c:\windows\temp', 'c:\winnt\temp');