From f656c3aadff13f700eb2ab7c9a1c78c32dc81d2c Mon Sep 17 00:00:00 2001 From: Peter Deltchev Date: Wed, 9 Sep 2015 09:05:15 -0700 Subject: [PATCH] T357: Handle the complete lack of ID3 tags gracefully. --- app/commands/ImportMLPMA.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/commands/ImportMLPMA.php b/app/commands/ImportMLPMA.php index fd3cb6d1..79f8571e 100644 --- a/app/commands/ImportMLPMA.php +++ b/app/commands/ImportMLPMA.php @@ -392,10 +392,13 @@ class ImportMLPMA extends Command { * @return array */ protected function getId3Tags($rawTags) { - if (array_key_exists('id3v2', $rawTags['tags'])) { + if (array_key_exists('tags', $rawTags) && + array_key_exists('id3v2', $rawTags['tags'])) { $tags = $rawTags['tags']['id3v2']; - } else if (array_key_exists('id3v1', $rawTags['tags'])) { + } else if ( + array_key_exists('tags', $rawTags) && + array_key_exists('id3v1', $rawTags['tags'])) { $tags = $rawTags['tags']['id3v1']; } else {