From ec6bc8bdfe706da8ace59f9db9fba62f8390a1a1 Mon Sep 17 00:00:00 2001 From: "Abdulmhsen B. A. A" Date: Sun, 24 Apr 2022 23:31:23 +0300 Subject: [PATCH] Cast ignore list to string regardless of value. --- src/Libs/Servers/JellyfinServer.php | 2 +- src/Libs/Servers/PlexServer.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Libs/Servers/JellyfinServer.php b/src/Libs/Servers/JellyfinServer.php index ced017de..1c1b0488 100644 --- a/src/Libs/Servers/JellyfinServer.php +++ b/src/Libs/Servers/JellyfinServer.php @@ -427,7 +427,7 @@ class JellyfinServer implements ServerInterface $ignoreIds = null; if (null !== ($this->options['ignore'] ?? null)) { - $ignoreIds = array_map(fn($v) => trim($v), explode(',', $this->options['ignore'])); + $ignoreIds = array_map(fn($v) => trim($v), explode(',', (string)$this->options['ignore'])); } $promises = []; diff --git a/src/Libs/Servers/PlexServer.php b/src/Libs/Servers/PlexServer.php index 23f9e6af..ebecab50 100644 --- a/src/Libs/Servers/PlexServer.php +++ b/src/Libs/Servers/PlexServer.php @@ -284,7 +284,7 @@ class PlexServer implements ServerInterface $ignoreIds = null; if (null !== ($this->options['ignore'] ?? null)) { - $ignoreIds = array_map(fn($v) => trim($v), explode(',', $this->options['ignore'])); + $ignoreIds = array_map(fn($v) => trim($v), explode(',', (string)$this->options['ignore'])); } if (null !== $ignoreIds && in_array(ag($json, 'Metadata.librarySectionID', '???'), $ignoreIds)) {