T357: Handle the complete lack of ID3 tags gracefully.

This commit is contained in:
Peter Deltchev 2015-09-09 09:05:15 -07:00
parent 9b10161ca4
commit f656c3aadf

View file

@ -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 {