Changeset 47601 for trunk/src/wp-includes/ID3/getid3.php
- Timestamp:
- 04/20/2020 11:11:48 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/ID3/getid3.php
r46586 r47601 251 251 protected $startup_warning = ''; 252 252 253 const VERSION = '1.9.1 8-201907240906';253 const VERSION = '1.9.19-201912131005'; 254 254 const FREAD_BUFFER_SIZE = 32768; 255 255 … … 267 267 268 268 // Check memory 269 $ this->memory_limit = ini_get('memory_limit');270 if (preg_match('#([0-9]+) ?M#i', $ this->memory_limit, $matches)) {269 $memoryLimit = ini_get('memory_limit'); 270 if (preg_match('#([0-9]+) ?M#i', $memoryLimit, $matches)) { 271 271 // could be stored as "16M" rather than 16777216 for example 272 $ this->memory_limit = $matches[1] * 1048576;273 } elseif (preg_match('#([0-9]+) ?G#i', $ this->memory_limit, $matches)) { // The 'G' modifier is available since PHP 5.1.0272 $memoryLimit = $matches[1] * 1048576; 273 } elseif (preg_match('#([0-9]+) ?G#i', $memoryLimit, $matches)) { // The 'G' modifier is available since PHP 5.1.0 274 274 // could be stored as "2G" rather than 2147483648 for example 275 $this->memory_limit = $matches[1] * 1073741824; 276 } 275 $memoryLimit = $matches[1] * 1073741824; 276 } 277 $this->memory_limit = $memoryLimit; 278 277 279 if ($this->memory_limit <= 0) { 278 280 // memory limits probably disabled … … 288 290 } 289 291 290 if (($mbstring_func_overload = ini_get('mbstring.func_overload')) && ($mbstring_func_overload & 0x02)) {292 if (($mbstring_func_overload = (int) ini_get('mbstring.func_overload')) && ($mbstring_func_overload & 0x02)) { 291 293 // http://php.net/manual/en/mbstring.overload.php 292 294 // "mbstring.func_overload in php.ini is a positive value that represents a combination of bitmasks specifying the categories of functions to be overloaded. It should be set to 1 to overload the mail() function. 2 for string functions, 4 for regular expression functions" … … 295 297 } 296 298 297 // WORDPRESS CHANGE FROM UPSTREAM 298 // Comment out deprecated function 299 /* 300 // Check for magic_quotes_runtime 301 if (function_exists('get_magic_quotes_runtime')) { 302 if (get_magic_quotes_runtime()) { 303 $this->startup_error .= 'magic_quotes_runtime must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_runtime(0) and set_magic_quotes_runtime(1).'."\n"; 304 } 305 } 306 307 // Check for magic_quotes_gpc 308 if (function_exists('magic_quotes_gpc')) { 309 if (get_magic_quotes_gpc()) { 310 $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"; 311 } 312 } 313 **/ 299 // check for magic quotes in PHP < 7.4.0 (when these functions became deprecated) 300 if (version_compare(PHP_VERSION, '7.4.0', '<')) { 301 // Check for magic_quotes_runtime 302 if (function_exists('get_magic_quotes_runtime')) { 303 if (get_magic_quotes_runtime()) { 304 $this->startup_error .= 'magic_quotes_runtime must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_runtime(0) and set_magic_quotes_runtime(1).'."\n"; 305 } 306 } 307 // Check for magic_quotes_gpc 308 if (function_exists('get_magic_quotes_gpc')) { 309 if (get_magic_quotes_gpc()) { 310 $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"; 311 } 312 } 313 } 314 314 315 315 // Load support library … … 403 403 404 404 /** 405 * @param string $filename 406 * @param int $filesize 405 * @param string $filename 406 * @param int $filesize 407 * @param resource $fp 407 408 * 408 409 * @return bool … … 514 515 * analyze file 515 516 * 516 * @param string $filename 517 * @param int $filesize 518 * @param string $original_filename 517 * @param string $filename 518 * @param int $filesize 519 * @param string $original_filename 520 * @param resource $fp 519 521 * 520 522 * @return array … … 1105 1107 'module' => 'ts', 1106 1108 'mime_type' => 'video/MP2T', 1109 ), 1110 1111 // WTV - audio/video - Windows Recorded TV Show 1112 'wtv' => array( 1113 'pattern' => '^\\xB7\\xD8\\x00\\x20\\x37\\x49\\xDA\\x11\\xA6\\x4E\\x00\\x07\\xE9\\x5E\\xAD\\x8D', 1114 'group' => 'audio-video', 1115 'module' => 'wtv', 1116 'mime_type' => 'video/x-ms-wtv', 1107 1117 ), 1108 1118 … … 1529 1539 default: 1530 1540 return $this->error('bad algorithm "'.$algorithm.'" in getHashdata()'); 1531 break;1532 1541 } 1533 1542
Note: See TracChangeset
for help on using the changeset viewer.