diff options
author | momo-i <momo-i@ampache> | 2009-07-03 00:02:37 +0000 |
---|---|---|
committer | momo-i <momo-i@ampache> | 2009-07-03 00:02:37 +0000 |
commit | a0f3195f682e7733a642fcc6892e2ed10a7c83b3 (patch) | |
tree | ae03633c7985f9d580b3fe88a414ea07127f8edf /lib/class/vainfo.class.php | |
parent | 6136bb10817c1677fb981f0c73737ad69e965d25 (diff) | |
download | ampache-a0f3195f682e7733a642fcc6892e2ed10a7c83b3.tar.gz ampache-a0f3195f682e7733a642fcc6892e2ed10a7c83b3.tar.bz2 ampache-a0f3195f682e7733a642fcc6892e2ed10a7c83b3.zip |
fix empty check for $id3v2['UFID']
Diffstat (limited to 'lib/class/vainfo.class.php')
-rw-r--r-- | lib/class/vainfo.class.php | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/class/vainfo.class.php b/lib/class/vainfo.class.php index 17952fd9..bcccc587 100644 --- a/lib/class/vainfo.class.php +++ b/lib/class/vainfo.class.php @@ -684,18 +684,20 @@ class vainfo { $id3v2 = $this->_raw['id3v2']; - foreach ($id3v2['UFID'] as $ufid) { - if ($ufid['ownerid'] == 'http://musicbrainz.org') { - $array['mb_trackid'] = $this->_clean_tag($ufid['data'],''); + if(!empty($id3v2['UFID'])) { + foreach ($id3v2['UFID'] as $ufid) { + if ($ufid['ownerid'] == 'http://musicbrainz.org') { + $array['mb_trackid'] = $this->_clean_tag($ufid['data'],''); + } } - } - for ($i = 0, $size = sizeof($id3v2['comments']['text']) ; $i < $size ; $i++) { - if ($id3v2['TXXX'][$i]['description'] == 'MusicBrainz Album Id') { - $array['mb_albumid'] = $this->_clean_tag($id3v2['comments']['text'][$i],''); - } - elseif ($id3v2['TXXX'][$i]['description'] == 'MusicBrainz Artist Id') { - $array['mb_artistid'] = $this->_clean_tag($id3v2['comments']['text'][$i],''); + for ($i = 0, $size = sizeof($id3v2['comments']['text']) ; $i < $size ; $i++) { + if ($id3v2['TXXX'][$i]['description'] == 'MusicBrainz Album Id') { + $array['mb_albumid'] = $this->_clean_tag($id3v2['comments']['text'][$i],''); + } + elseif ($id3v2['TXXX'][$i]['description'] == 'MusicBrainz Artist Id') { + $array['mb_artistid'] = $this->_clean_tag($id3v2['comments']['text'][$i],''); + } } } |