From 4716e5281ab2c4975033bed5bc3d4edd80d60eb9 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Mon, 9 Mar 2026 09:43:19 +0100 Subject: [PATCH] Fix type mismatch --- app/Services/TraktService.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Services/TraktService.php b/app/Services/TraktService.php index 3581dae05..a6b67ae23 100644 --- a/app/Services/TraktService.php +++ b/app/Services/TraktService.php @@ -489,18 +489,20 @@ class TraktService /** * Get show summary. * - * @param string $show Show slug or ID + * @param int|string $show Show slug or ID * @param string $extended Extended info level: 'min' or 'full' * @return array|null Show data or null on failure */ - public function getShowSummary(string $show, string $extended = 'full'): ?array + public function getShowSummary(int|string $show, string $extended = 'full'): ?array { - if (empty($show)) { + $showKey = trim((string) $show); + + if ($showKey === '') { return null; } $extended = $extended === 'full' ? 'full' : 'min'; - $slug = Str::slug($show); + $slug = Str::slug($showKey); $cacheKey = "trakt_show_{$slug}_{$extended}"; return Cache::remember($cacheKey, now()->addHours(self::CACHE_TTL_HOURS), function () use ($slug, $extended) {