Merge remote-tracking branch 'origin/master' into php8
This commit is contained in:
commit
fa61e4507c
@ -584,7 +584,7 @@ class Database extends AbstractData
|
|||||||
// workaround for https://bugs.php.net/bug.php?id=46728
|
// workaround for https://bugs.php.net/bug.php?id=46728
|
||||||
$result = array();
|
$result = array();
|
||||||
while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {
|
while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {
|
||||||
$result[] = array_map('self::_sanitizeClob', $row);
|
$result[] = array_map('PrivateBin\Data\Database::_sanitizeClob', $row);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$result = $statement->fetchAll(PDO::FETCH_ASSOC);
|
$result = $statement->fetchAll(PDO::FETCH_ASSOC);
|
||||||
@ -593,7 +593,7 @@ class Database extends AbstractData
|
|||||||
if (self::$_type === 'oci' && is_array($result)) {
|
if (self::$_type === 'oci' && is_array($result)) {
|
||||||
// returned CLOB values are streams, convert these into strings
|
// returned CLOB values are streams, convert these into strings
|
||||||
$result = $firstOnly ?
|
$result = $firstOnly ?
|
||||||
array_map('self::_sanitizeClob', $result) :
|
array_map('PrivateBin\Data\Database::_sanitizeClob', $result) :
|
||||||
$result;
|
$result;
|
||||||
}
|
}
|
||||||
return $result;
|
return $result;
|
||||||
|
@ -351,7 +351,7 @@ class Filesystem extends AbstractData
|
|||||||
$pastes = array();
|
$pastes = array();
|
||||||
$firstLevel = array_filter(
|
$firstLevel = array_filter(
|
||||||
scandir(self::$_path),
|
scandir(self::$_path),
|
||||||
'self::_isFirstLevelDir'
|
'PrivateBin\Data\Filesystem::_isFirstLevelDir'
|
||||||
);
|
);
|
||||||
if (count($firstLevel) > 0) {
|
if (count($firstLevel) > 0) {
|
||||||
// try at most 10 times the $batchsize pastes before giving up
|
// try at most 10 times the $batchsize pastes before giving up
|
||||||
@ -359,7 +359,7 @@ class Filesystem extends AbstractData
|
|||||||
$firstKey = array_rand($firstLevel);
|
$firstKey = array_rand($firstLevel);
|
||||||
$secondLevel = array_filter(
|
$secondLevel = array_filter(
|
||||||
scandir(self::$_path . DIRECTORY_SEPARATOR . $firstLevel[$firstKey]),
|
scandir(self::$_path . DIRECTORY_SEPARATOR . $firstLevel[$firstKey]),
|
||||||
'self::_isSecondLevelDir'
|
'PrivateBin\Data\Filesystem::_isSecondLevelDir'
|
||||||
);
|
);
|
||||||
|
|
||||||
// skip this folder in the next checks if it is empty
|
// skip this folder in the next checks if it is empty
|
||||||
|
@ -84,7 +84,7 @@ class I18n
|
|||||||
*/
|
*/
|
||||||
public static function _($messageId)
|
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());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user