Changeset 61253 for trunk/src/wp-includes/ID3/getid3.php
- Timestamp:
- 11/17/2025 10:20:32 PM (3 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/ID3/getid3.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ID3/getid3.php
r60812 r61253 388 388 protected $startup_warning = ''; 389 389 390 const VERSION = '1.9.2 3-202310190849';390 const VERSION = '1.9.24-202509040923'; 391 391 const FREAD_BUFFER_SIZE = 32768; 392 392 … … 410 410 if (preg_match('#([0-9]+) ?M#i', $memoryLimit, $matches)) { 411 411 // could be stored as "16M" rather than 16777216 for example 412 $memoryLimit = $matches[1] * 1048576;412 $memoryLimit = (int) $matches[1] * 1048576; 413 413 } elseif (preg_match('#([0-9]+) ?G#i', $memoryLimit, $matches)) { // The 'G' modifier is available since PHP 5.1.0 414 414 // could be stored as "2G" rather than 2147483648 for example 415 $memoryLimit = $matches[1] * 1073741824;415 $memoryLimit = (int) $matches[1] * 1073741824; 416 416 } 417 417 $this->memory_limit = $memoryLimit; … … 447 447 // Check for magic_quotes_gpc 448 448 if (function_exists('get_magic_quotes_gpc')) { 449 if (get_magic_quotes_gpc()) { // @phpstan-ignore-line449 if (get_magic_quotes_gpc()) { 450 450 $this->startup_error .= 'magic_quotes_gpc must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_gpc(0) and set_magic_quotes_gpc(1).'."\n"; 451 451 } … … 530 530 */ 531 531 public function setOption($optArray) { 532 if ( !is_array($optArray) ||empty($optArray)) {532 if (empty($optArray)) { 533 533 return false; 534 534 } … … 681 681 throw $e; 682 682 } 683 } else { 684 $this->warning('skipping check for '.$tag_name.' tags since option_tag_'.$tag_name.'=FALSE'); 683 685 } 684 686 } … … 1477 1479 1478 1480 // Misc other formats 1481 1482 // GPX - data - GPS Exchange Format 1483 'gpx' => array ( 1484 'pattern' => '^<\\?xml [^>]+>[\s]*<gpx ', 1485 'group' => 'misc', 1486 'module' => 'gpx', 1487 'mime_type' => 'application/gpx+xml', 1488 'fail_id3' => 'ERROR', 1489 'fail_ape' => 'ERROR', 1490 ), 1479 1491 1480 1492 // PAR2 - data - Parity Volume Set Specification 2.0 … … 1891 1903 // Calculate combined bitrate - audio + video 1892 1904 $CombinedBitrate = 0; 1893 $CombinedBitrate += (isset($this->info['audio']['bitrate']) ? $this->info['audio']['bitrate'] : 0);1894 $CombinedBitrate += (isset($this->info['video']['bitrate']) ? $this->info['video']['bitrate'] : 0);1905 $CombinedBitrate += (isset($this->info['audio']['bitrate']) && ($this->info['audio']['bitrate'] != 'free') ? $this->info['audio']['bitrate'] : 0); 1906 $CombinedBitrate += (isset($this->info['video']['bitrate']) ? $this->info['video']['bitrate'] : 0); 1895 1907 if (($CombinedBitrate > 0) && empty($this->info['bitrate'])) { 1896 1908 $this->info['bitrate'] = $CombinedBitrate; … … 1999 2011 return false; 2000 2012 } 2001 $this->info['audio']['compression_ratio'] = $this->info['audio']['bitrate'] / ($this->info['audio']['channels'] * $this->info['audio']['sample_rate'] * (!empty($this->info['audio']['bits_per_sample']) ? $this->info['audio']['bits_per_sample'] : 16)); 2013 if ($this->info['audio']['bitrate'] != 'free') { 2014 $this->info['audio']['compression_ratio'] = $this->info['audio']['bitrate'] / ($this->info['audio']['channels'] * $this->info['audio']['sample_rate'] * (!empty($this->info['audio']['bits_per_sample']) ? $this->info['audio']['bits_per_sample'] : 16)); 2015 } 2002 2016 2003 2017 if (!empty($this->info['audio']['streams'])) {
Note: See TracChangeset
for help on using the changeset viewer.