Ticket #37680: 37680.diff
File 37680.diff, 1.4 KB (added by , 8 years ago) |
---|
-
src/wp-includes/load.php
function wp_convert_hr_to_bytes( $value 1002 1002 // Deal with large (float) values which run into the maximum integer size. 1003 1003 return min( $bytes, PHP_INT_MAX ); 1004 1004 } 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 static $ini_all ;1017 static $ini_all = false; 1018 1018 1019 if ( ! isset( $ini_all )) {1020 $ini_all = ini_get_all();1019 if ( false === $ini_all ) { 1020 $ini_all = @ini_get_all(); 1021 1021 } 1022 1022 1023 1023 // 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 1024 if ( isset( $ini_all[ $setting ]['access'] ) && ( INI_ALL === ( $ini_all[ $setting ]['access'] & 7 ) || INI_USER === ( $ini_all[ $setting ]['access'] & 7 ) ) ) { 1025 1025 return true; 1026 1026 } 1027 1027 1028 // If we were unable to retrieve the details, fail gracefully to assume it's changeable. 1029 if ( ! is_array( $ini_all ) ) { 1030 return true; 1031 } 1032 1028 1033 return false; 1029 1034 }