Changeset 41196 for trunk/src/wp-includes/ID3/module.tag.lyrics3.php
- Timestamp:
- 07/31/2017 07:49:31 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/ID3/module.tag.lyrics3.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ID3/module.tag.lyrics3.php
r32979 r41196 25 25 26 26 if (!getid3_lib::intValueSupported($info['filesize'])) { 27 $ info['warning'][] = 'Unable to check for Lyrics3 because file is larger than '.round(PHP_INT_MAX / 1073741824).'GB';27 $this->warning('Unable to check for Lyrics3 because file is larger than '.round(PHP_INT_MAX / 1073741824).'GB'); 28 28 return false; 29 29 } … … 81 81 $info['avdataend'] = $lyrics3offset; 82 82 $lyrics3version = 1; 83 $ info['warning'][] = 'APE tag located after Lyrics3, will probably break Lyrics3 compatability';83 $this->warning('APE tag located after Lyrics3, will probably break Lyrics3 compatability'); 84 84 85 85 } elseif ($lyrics3end == 'LYRICS200') { … … 89 89 $lyrics3offset = $info['ape']['tag_offset_start'] - $lyrics3size; 90 90 $lyrics3version = 2; 91 $ info['warning'][] = 'APE tag located after Lyrics3, will probably break Lyrics3 compatability';91 $this->warning('APE tag located after Lyrics3, will probably break Lyrics3 compatability'); 92 92 93 93 } … … 118 118 unset($getid3_temp, $getid3_apetag); 119 119 } else { 120 $ info['warning'][] = 'Lyrics3 and APE tags appear to have become entangled (most likely due to updating the APE tags with a non-Lyrics3-aware tagger)';120 $this->warning('Lyrics3 and APE tags appear to have become entangled (most likely due to updating the APE tags with a non-Lyrics3-aware tagger)'); 121 121 } 122 122 } … … 133 133 134 134 if (!getid3_lib::intValueSupported($endoffset)) { 135 $ info['warning'][] = 'Unable to check for Lyrics3 because file is larger than '.round(PHP_INT_MAX / 1073741824).'GB';135 $this->warning('Unable to check for Lyrics3 because file is larger than '.round(PHP_INT_MAX / 1073741824).'GB'); 136 136 return false; 137 137 } … … 151 151 if (strpos($rawdata, 'LYRICSBEGIN') !== false) { 152 152 153 $ info['warning'][] = '"LYRICSBEGIN" expected at '.$endoffset.' but actually found at '.($endoffset + strpos($rawdata, 'LYRICSBEGIN')).' - this is invalid for Lyrics3 v'.$version;153 $this->warning('"LYRICSBEGIN" expected at '.$endoffset.' but actually found at '.($endoffset + strpos($rawdata, 'LYRICSBEGIN')).' - this is invalid for Lyrics3 v'.$version); 154 154 $info['avdataend'] = $endoffset + strpos($rawdata, 'LYRICSBEGIN'); 155 155 $rawdata = substr($rawdata, strpos($rawdata, 'LYRICSBEGIN')); … … 160 160 } else { 161 161 162 $ info['error'][] = '"LYRICSBEGIN" expected at '.$endoffset.' but found "'.substr($rawdata, 0, 11).'" instead';162 $this->error('"LYRICSBEGIN" expected at '.$endoffset.' but found "'.substr($rawdata, 0, 11).'" instead'); 163 163 return false; 164 164 … … 174 174 $this->Lyrics3LyricsTimestampParse($ParsedLyrics3); 175 175 } else { 176 $ info['error'][] = '"LYRICSEND" expected at '.($this->ftell() - 11 + $length - 9).' but found "'.substr($rawdata, strlen($rawdata) - 9, 9).'" instead';176 $this->error('"LYRICSEND" expected at '.($this->ftell() - 11 + $length - 9).' but found "'.substr($rawdata, strlen($rawdata) - 9, 9).'" instead'); 177 177 return false; 178 178 } … … 222 222 } 223 223 } else { 224 $ info['error'][] = '"LYRICS200" expected at '.($this->ftell() - 11 + $length - 9).' but found "'.substr($rawdata, strlen($rawdata) - 9, 9).'" instead';224 $this->error('"LYRICS200" expected at '.($this->ftell() - 11 + $length - 9).' but found "'.substr($rawdata, strlen($rawdata) - 9, 9).'" instead'); 225 225 return false; 226 226 } … … 228 228 229 229 default: 230 $ info['error'][] = 'Cannot process Lyrics3 version '.$version.' (only v1 and v2)';230 $this->error('Cannot process Lyrics3 version '.$version.' (only v1 and v2)'); 231 231 return false; 232 232 break; … … 235 235 236 236 if (isset($info['id3v1']['tag_offset_start']) && ($info['id3v1']['tag_offset_start'] <= $ParsedLyrics3['tag_offset_end'])) { 237 $ info['warning'][] = 'ID3v1 tag information ignored since it appears to be a false synch in Lyrics3 tag data';237 $this->warning('ID3v1 tag information ignored since it appears to be a false synch in Lyrics3 tag data'); 238 238 unset($info['id3v1']); 239 239 foreach ($info['warning'] as $key => $value) {
Note: See TracChangeset
for help on using the changeset viewer.