You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Coding Standards: Move specific sniff exclusions for getID3 to the config file.
This aims to make future updates of the library easier.
Follow-up to [47735], [47737], [47902].
See #63168.
git-svn-id: https://develop.svn.wordpress.org/trunk@60800 602fd350-edb4-49c9-b593-d223f7449a82
if (($mbstring_func_overload = (int) ini_get('mbstring.func_overload')) && ($mbstring_func_overload & 0x02)) {
434
433
// http://php.net/manual/en/mbstring.overload.php
435
434
// "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"
436
435
// getID3 cannot run when string functions are overloaded. It doesn't matter if mail() or ereg* functions are overloaded since getID3 does not use those.
$this->startup_error .= 'WARNING: php.ini contains "mbstring.func_overload = '.ini_get('mbstring.func_overload').'", getID3 cannot run with this setting (bitmask 2 (string functions) cannot be set). Recommended to disable entirely.'."\n";
439
437
}
440
438
441
439
// check for magic quotes in PHP < 5.4.0 (when these options were removed and getters always return false)
442
440
if (version_compare(PHP_VERSION, '5.4.0', '<')) {
443
441
// Check for magic_quotes_runtime
444
442
if (function_exists('get_magic_quotes_runtime')) {
if (get_magic_quotes_runtime()) { // @phpstan-ignore-line
447
444
$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";
if (get_magic_quotes_gpc()) { // @phpstan-ignore-line
454
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";
455
451
}
@@ -1790,7 +1786,6 @@ public function getHashdata($algorithm) {
1790
1786
// page sequence numbers likely happens for OggSpeex and OggFLAC as well, but
1791
1787
// currently vorbiscomment only works on OggVorbis files.
if (preg_match('#(1|ON)#i', ini_get('safe_mode'))) {
1795
1790
1796
1791
$this->warning('Failed making system call to vorbiscomment.exe - '.$algorithm.'_data is incorrect - error returned: PHP running in Safe Mode (backtick operator not available)');
if (preg_match('#^([\\+\\-])([0-9]{2}|[0-9]{4}|[0-9]{6})(\\.[0-9]+)?([\\+\\-])([0-9]{3}|[0-9]{5}|[0-9]{7})(\\.[0-9]+)?(([\\+\\-])([0-9]{3}|[0-9]{5}|[0-9]{7})(\\.[0-9]+)?)?/$#', $ISO6709string, $matches)) {
0 commit comments