From 4973aaadf6716550d36606b3b31f3c3f587e5cf9 Mon Sep 17 00:00:00 2001 From: Dag Date: Tue, 23 Jan 2024 21:45:22 +0100 Subject: [PATCH] fix(spotify): deprecation notice (#3914) 8192: explode(): Passing null to parameter #2 ($string) of type string is deprecated in bridges/SpotifyBridge.php line 322 --- bridges/SpotifyBridge.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bridges/SpotifyBridge.php b/bridges/SpotifyBridge.php index c02acd256b1..259480114c3 100644 --- a/bridges/SpotifyBridge.php +++ b/bridges/SpotifyBridge.php @@ -317,8 +317,10 @@ public function getName() private function getFirstEntry() { - $uris = explode(',', $this->getInput('spotifyuri')); - if (!is_null($this->getInput('spotifyuri')) && strpos($this->getInput('spotifyuri'), ',') === false) { + $spotifyUri = $this->getInput('spotifyuri'); + + if (!is_null($spotifyUri) && strpos($spotifyUri, ',') === false) { + $uris = explode(',', $spotifyUri); $firstUri = $uris[0]; $type = explode(':', $firstUri)[1]; $spotifyId = explode(':', $firstUri)[2];