Skip to content

Commit fdaae24

Browse files
Update app/Http/Controllers/DocumentController.php
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 0229d36 commit fdaae24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Http/Controllers/DocumentController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ public function check()
286286
$doc->link_count = $stats['nlink'] ?? 0;
287287
}
288288
$computedHash = hash_file('sha256', $filePath);
289-
$doc->hash_valid = $computedHash !== false && hash_equals($doc->hash, $computedHash);
289+
$doc->hash_valid = $computedHash !== false && $doc->hash !== null && hash_equals($doc->hash, $computedHash);
290290
}
291291

292292
return $doc;

0 commit comments

Comments
 (0)