From bff4d3a016349c4e628b9ee12eda51938b2225f0 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Tue, 25 Oct 2022 07:15:09 +0200 Subject: [PATCH] PHP 8.2 compatibility: Use of "self" in callables is deprecated --- lib/Data/Database.php | 4 ++-- lib/Data/Filesystem.php | 4 ++-- lib/I18n.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Data/Database.php b/lib/Data/Database.php index c34ee131..3ca7b756 100644 --- a/lib/Data/Database.php +++ b/lib/Data/Database.php @@ -584,7 +584,7 @@ class Database extends AbstractData // workaround for https://bugs.php.net/bug.php?id=46728 $result = array(); while ($row = $statement->fetch(PDO::FETCH_ASSOC)) { - $result[] = array_map('self::_sanitizeClob', $row); + $result[] = array_map('PrivateBin\Data\Database::_sanitizeClob', $row); } } else { $result = $statement->fetchAll(PDO::FETCH_ASSOC); @@ -593,7 +593,7 @@ class Database extends AbstractData if (self::$_type === 'oci' && is_array($result)) { // returned CLOB values are streams, convert these into strings $result = $firstOnly ? - array_map('self::_sanitizeClob', $result) : + array_map('PrivateBin\Data\Database::_sanitizeClob', $result) : $result; } return $result; diff --git a/lib/Data/Filesystem.php b/lib/Data/Filesystem.php index b2bc1eed..9674513c 100644 --- a/lib/Data/Filesystem.php +++ b/lib/Data/Filesystem.php @@ -351,7 +351,7 @@ class Filesystem extends AbstractData $pastes = array(); $firstLevel = array_filter( scandir(self::$_path), - 'self::_isFirstLevelDir' + 'PrivateBin\Data\Filesystem::_isFirstLevelDir' ); if (count($firstLevel) > 0) { // try at most 10 times the $batchsize pastes before giving up @@ -359,7 +359,7 @@ class Filesystem extends AbstractData $firstKey = array_rand($firstLevel); $secondLevel = array_filter( scandir(self::$_path . DIRECTORY_SEPARATOR . $firstLevel[$firstKey]), - 'self::_isSecondLevelDir' + 'PrivateBin\Data\Filesystem::_isSecondLevelDir' ); // skip this folder in the next checks if it is empty diff --git a/lib/I18n.php b/lib/I18n.php index 6394a584..c3c635f7 100644 --- a/lib/I18n.php +++ b/lib/I18n.php @@ -84,7 +84,7 @@ class I18n */ public static function _($messageId) { - return forward_static_call_array('self::translate', func_get_args()); + return forward_static_call_array('PrivateBin\I18n::translate', func_get_args()); } /**