From 760649a67ddf30292b4cd7eb9fbf1cf8f51dd509 Mon Sep 17 00:00:00 2001 From: Vehikl Date: Thu, 2 Jan 2025 17:06:19 -0500 Subject: [PATCH] Fixed Global Searching --- app/Models/File.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/Models/File.php b/app/Models/File.php index 9f9f6f2aa..7b94352ed 100644 --- a/app/Models/File.php +++ b/app/Models/File.php @@ -143,6 +143,16 @@ class File extends Model throw new Exception($contents['error']); } + // No files found, for example + if (isset($contents['message'])) { + Notification::make() + ->title($contents['message']) + ->warning() + ->send(); + + return []; + } + return array_map(function ($file) { return [ 'name' => $file['name'],