Ticket #37680: 37680.2.diff
File 37680.2.diff, 1.3 KB (added by , 8 years ago) |
---|
-
src/wp-includes/load.php
function wp_convert_hr_to_bytes( $value 1005 1005 1006 1006 /** 1007 1007 * Determines whether a PHP ini value is changeable at runtime. 1008 1008 * 1009 1009 * @since 4.6.0 1010 1010 * 1011 1011 * @link https://secure.php.net/manual/en/function.ini-get-all.php 1012 1012 * 1013 1013 * @param string $setting The name of the ini setting to check. 1014 1014 * @return bool True if the value is changeable at runtime. False otherwise. 1015 1015 */ 1016 1016 function wp_is_ini_value_changeable( $setting ) { 1017 1017 static $ini_all; 1018 1018 1019 1019 if ( ! isset( $ini_all ) ) { 1020 $ini_all = ini_get_all(); 1020 if ( false !== strpos( ini_get( 'disable_functions' ), 'ini_get_all' ) ) { 1021 $ini_all = false; 1022 } else { 1023 $ini_all = ini_get_all(); 1024 } 1021 1025 } 1022 1026 1023 1027 // Bit operator to workaround https://bugs.php.net/bug.php?id=44936 which changes access level to 63 in PHP 5.2.6 - 5.2.17. 1024 1028 if ( isset( $ini_all[ $setting ]['access'] ) && ( INI_ALL === ( $ini_all[ $setting ]['access'] & 7 ) || INI_USER === ( $ini_all[ $setting ]['access'] & 7 ) ) ) { 1025 1029 return true; 1026 1030 } 1027 1031 1032 // If we were unable to retrieve the details, fail gracefully to assume it's changeable. 1033 if ( ! is_array( $ini_all ) ) { 1034 return true; 1035 } 1036 1028 1037 return false; 1029 1038 }