fix(spotify): deprecation notice (#3914)

8192: explode(): Passing null to parameter #2 ($string) of type string is deprecated in bridges/SpotifyBridge.php line 322
This commit is contained in:
Dag 2024-01-23 21:45:22 +01:00 committed by GitHub
parent feb2a686d7
commit 4973aaadf6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -317,8 +317,10 @@ class SpotifyBridge extends BridgeAbstract
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];