summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-11-28 08:36:10 +0100
committerGitHub <noreply@github.com>2019-11-28 08:36:10 +0100
commit669302e570024c83140ff5c4f4b1489c5a1c66ed (patch)
tree010182798f5c83193554031753e063a8a0b35ca1 /lib/private
parent125be68311a319f2b839e5aa4ea29cd642cd1e00 (diff)
parente3e782b63df4f1d65c86cb3b204b4bdecf93a6cd (diff)
downloadnextcloud-server-669302e570024c83140ff5c4f4b1489c5a1c66ed.tar.gz
nextcloud-server-669302e570024c83140ff5c4f4b1489c5a1c66ed.zip
Merge pull request #18064 from nextcloud/feature/php74
Add php7.4 support
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/Storage/Local.php26
-rw-r--r--lib/private/Log/ExceptionSerializer.php4
2 files changed, 23 insertions, 7 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index e9a9e8e9885..aade0cdaf25 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -424,12 +424,26 @@ class Local extends \OC\Files\Storage\Common {
public function getETag($path) {
if ($this->is_file($path)) {
$stat = $this->stat($path);
- return md5(
- $stat['mtime'] .
- $stat['ino'] .
- $stat['dev'] .
- $stat['size']
- );
+
+ if ($stat === false) {
+ return md5('');
+ }
+
+ $toHash = '';
+ if (isset($stat['mtime'])) {
+ $toHash .= $stat['mtime'];
+ }
+ if (isset($stat['ino'])) {
+ $toHash .= $stat['ino'];
+ }
+ if (isset($stat['dev'])) {
+ $toHash .= $stat['dev'];
+ }
+ if (isset($stat['size'])) {
+ $toHash .= $stat['size'];
+ }
+
+ return md5($toHash);
} else {
return parent::getETag($path);
}
diff --git a/lib/private/Log/ExceptionSerializer.php b/lib/private/Log/ExceptionSerializer.php
index 8cfdb57b225..a3b855aea26 100644
--- a/lib/private/Log/ExceptionSerializer.php
+++ b/lib/private/Log/ExceptionSerializer.php
@@ -92,7 +92,9 @@ class ExceptionSerializer {
];
private function editTrace(array &$sensitiveValues, array $traceLine): array {
- $sensitiveValues = array_merge($sensitiveValues, $traceLine['args']);
+ if (isset($traceLine['args'])) {
+ $sensitiveValues = array_merge($sensitiveValues, $traceLine['args']);
+ }
$traceLine['args'] = ['*** sensitive parameters replaced ***'];
return $traceLine;
}