Ticket #25760: 25760.diff
| File 25760.diff, 1.4 KB (added by , 12 years ago) |
|---|
-
src/wp-includes/compat.php
32 32 return implode( '', $chars ); 33 33 } 34 34 35 if ( ! function_exists( 'stripos' ) ) { 36 function stripos( $haystack, $needle, $offset = 0 ) { 37 return strpos( strtolower( $haystack ), strtolower( $needle ), $offset ); 38 } 39 } 40 35 41 if ( !function_exists('hash_hmac') ): 36 42 function hash_hmac($algo, $data, $key, $raw_output = false) { 37 43 return _hash_hmac($algo, $data, $key, $raw_output); -
src/wp-includes/default-constants.php
42 42 if ( function_exists( 'memory_get_usage' ) ) { 43 43 $current_limit = @ini_get( 'memory_limit' ); 44 44 $current_limit_int = intval( $current_limit ); 45 if ( false !== stripos( $current_limit, 'G' ) ) 45 // Avoid stripos() so we can fail gracefully in PHP4. 46 if ( false !== strpos( strtoupper( $current_limit ), 'G' ) ) 46 47 $current_limit_int *= 1024; 47 48 $wp_limit_int = intval( WP_MEMORY_LIMIT ); 48 if ( false !== str ipos( WP_MEMORY_LIMIT, 'G' ) )49 if ( false !== strpos( strtoupper( WP_MEMORY_LIMIT ), 'G' ) ) 49 50 $wp_limit_int *= 1024; 50 51 51 52 if ( -1 != $current_limit && ( -1 == WP_MEMORY_LIMIT || $current_limit_int < $wp_limit_int ) )