We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 49430e6 commit 0229d36Copy full SHA for 0229d36
app/Http/Controllers/DocumentController.php
@@ -282,8 +282,9 @@ public function check()
282
283
if ($fileExists) {
284
$stats = stat($filePath);
285
- $doc->link_count = $stats['nlink'] ?? 0;
286
-
+ if ($stats !== false) {
+ $doc->link_count = $stats['nlink'] ?? 0;
287
+ }
288
$computedHash = hash_file('sha256', $filePath);
289
$doc->hash_valid = $computedHash !== false && hash_equals($doc->hash, $computedHash);
290
}
0 commit comments