From 1fd6594dfa7909ec10a3bc6d33703beb29aaa47d Mon Sep 17 00:00:00 2001 From: Sten Govaerts Date: Fri, 27 Sep 2024 15:19:28 +0200 Subject: [PATCH] Make hasMedia method signature compatible with getMedia in InteractsWithMedia.php The $filters arg of hasMedia does not allow the callable type, while it just calls getMedia which does allow it. --- src/InteractsWithMedia.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/InteractsWithMedia.php b/src/InteractsWithMedia.php index 6e7eb730e..44b4604bf 100644 --- a/src/InteractsWithMedia.php +++ b/src/InteractsWithMedia.php @@ -242,7 +242,7 @@ public function copyMedia(string|UploadedFile $file): FileAdder /* * Determine if there is media in the given collection. */ - public function hasMedia(string $collectionName = 'default', array $filters = []): bool + public function hasMedia(string $collectionName = 'default', array|callable $filters = []): bool { return count($this->getMedia($collectionName, $filters)) ? true : false; }