Changeset 54376 for trunk/src/wp-includes/ID3/getid3.php
- Timestamp:
- 10/04/2022 02:06:29 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ID3/getid3.php
r52254 r54376 183 183 184 184 /** 185 * Use MD5 of source file if avail ble - only FLAC and OptimFROG185 * Use MD5 of source file if available - only FLAC and OptimFROG 186 186 * 187 187 * @var bool … … 388 388 protected $startup_warning = ''; 389 389 390 const VERSION = '1.9.2 1-202109171300';390 const VERSION = '1.9.22-202207161647'; 391 391 const FREAD_BUFFER_SIZE = 32768; 392 392 … … 394 394 const ATTACHMENTS_INLINE = true; 395 395 396 /** 397 * @throws getid3_exception 398 */ 396 399 public function __construct() { 397 400 … … 570 573 571 574 // remote files not supported 572 if (preg_match('#^(ht|f)tp ://#', $filename)) {575 if (preg_match('#^(ht|f)tps?://#', $filename)) { 573 576 throw new getid3_exception('Remote files are not supported - please copy the file locally first'); 574 577 } … … 1056 1059 ), 1057 1060 1058 // has been known to produce false matches in random files (e.g. JPEGs), leave out until more precise matching available 1059 // // MOD - audio - MODule (assorted sub-formats) 1060 // 'mod' => array( 1061 // 'pattern' => '^.{1080}(M\\.K\\.|M!K!|FLT4|FLT8|[5-9]CHN|[1-3][0-9]CH)', 1062 // 'group' => 'audio', 1063 // 'module' => 'mod', 1064 // 'option' => 'mod', 1065 // 'mime_type' => 'audio/mod', 1066 // ), 1061 1062 // MOD - audio - MODule (SoundTracker) 1063 'mod' => array( 1064 //'pattern' => '^.{1080}(M\\.K\\.|M!K!|FLT4|FLT8|[5-9]CHN|[1-3][0-9]CH)', // has been known to produce false matches in random files (e.g. JPEGs), leave out until more precise matching available 1065 'pattern' => '^.{1080}(M\\.K\\.)', 1066 'group' => 'audio', 1067 'module' => 'mod', 1068 'option' => 'mod', 1069 'mime_type' => 'audio/mod', 1070 ), 1067 1071 1068 1072 // MOD - audio - MODule (Impulse Tracker) … … 1095 1099 // MPC - audio - Musepack / MPEGplus 1096 1100 'mpc' => array( 1097 'pattern' => '^(MPCK|MP\\+ |[\\x00\\x01\\x10\\x11\\x40\\x41\\x50\\x51\\x80\\x81\\x90\\x91\\xC0\\xC1\\xD0\\xD1][\\x20-\\x37][\\x00\\x20\\x40\\x60\\x80\\xA0\\xC0\\xE0])',1101 'pattern' => '^(MPCK|MP\\+)', 1098 1102 'group' => 'audio', 1099 1103 'module' => 'mpc', … … 1550 1554 $GetFileFormatArray = $this->GetFileFormatArray(); 1551 1555 $info = $GetFileFormatArray['mp3']; 1556 $info['include'] = 'module.'.$info['group'].'.'.$info['module'].'.php'; 1557 return $info; 1558 } elseif (preg_match('#\\.mp[cp\\+]$#i', $filename) && preg_match('#[\x00\x01\x10\x11\x40\x41\x50\x51\x80\x81\x90\x91\xC0\xC1\xD0\xD1][\x20-37][\x00\x20\x40\x60\x80\xA0\xC0\xE0]#s', $filedata)) { 1559 // old-format (SV4-SV6) Musepack header that has a very loose pattern match and could falsely match other data (e.g. corrupt mp3) 1560 // only enable this pattern check if the filename ends in .mpc/mpp/mp+ 1561 $GetFileFormatArray = $this->GetFileFormatArray(); 1562 $info = $GetFileFormatArray['mpc']; 1552 1563 $info['include'] = 'module.'.$info['group'].'.'.$info['module'].'.php'; 1553 1564 return $info; … … 2199 2210 return substr($this->data_string, $this->data_string_position - $bytes, $bytes); 2200 2211 } 2212 if ($bytes == 0) { 2213 return ''; 2214 } elseif ($bytes < 0) { 2215 throw new getid3_exception('cannot fread('.$bytes.' from '.$this->ftell().')', 10); 2216 } 2201 2217 $pos = $this->ftell() + $bytes; 2202 2218 if (!getid3_lib::intValueSupported($pos)) {
Note: See TracChangeset
for help on using the changeset viewer.