From 640b6e04755b00e3c56ab5dd33f9c7b80306a181 Mon Sep 17 00:00:00 2001 From: mrom Date: Wed, 6 Nov 2024 16:05:26 +0200 Subject: [PATCH] Fix crash in hash calculation --- src/applications/files/storage/PhabricatorFile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/files/storage/PhabricatorFile.php b/src/applications/files/storage/PhabricatorFile.php index 32029886f0..f215c59377 100644 --- a/src/applications/files/storage/PhabricatorFile.php +++ b/src/applications/files/storage/PhabricatorFile.php @@ -786,7 +786,7 @@ public static function hashFileContent($data) { // it just means we'll store extra data when users upload duplicate files // instead of being able to deduplicate it. - $hash = hash('sha256', $data, $raw_output = false); + $hash = hash('sha256', phutil_string_cast($data), $raw_output = false); if ($hash === false) { return null; }