Skip to content

Commit

Permalink
Merge pull request #3712 from sten/patch-1
Browse files Browse the repository at this point in the history
Make hasMedia method signature compatible with getMedia in InteractsWithMedia
  • Loading branch information
timvandijck authored Oct 18, 2024
2 parents 2155bfb + 1fd6594 commit dc28567
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/InteractsWithMedia.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit dc28567

Please sign in to comment.