Skip to content

Commit 0229d36

Browse files
committed
fix
1 parent 49430e6 commit 0229d36

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/Http/Controllers/DocumentController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,9 @@ public function check()
282282

283283
if ($fileExists) {
284284
$stats = stat($filePath);
285-
$doc->link_count = $stats['nlink'] ?? 0;
286-
285+
if ($stats !== false) {
286+
$doc->link_count = $stats['nlink'] ?? 0;
287+
}
287288
$computedHash = hash_file('sha256', $filePath);
288289
$doc->hash_valid = $computedHash !== false && hash_equals($doc->hash, $computedHash);
289290
}

0 commit comments

Comments
 (0)