Ticket #23251: 23251.patch
| File 23251.patch, 860 bytes (added by , 13 years ago) |
|---|
-
default-constants.php
41 41 // set memory limits. 42 42 if ( function_exists( 'memory_get_usage' ) ) { 43 43 $current_limit = @ini_get( 'memory_limit' ); 44 if ( -1 != $current_limit && ( -1 == WP_MEMORY_LIMIT || ( intval( $current_limit ) < abs( intval( WP_MEMORY_LIMIT ) ) ) ) ) 44 $current_limit_int = intval( $current_limit ); 45 if( stripos( $current_limit, 'G' ) !== false ) { 46 $current_limit_int *= 1024; 47 } elseif( stripos( $current_limit, 'T' ) !== false ) { 48 $current_limit_int *= (1024*1024); 49 } 50 if ( -1 != $current_limit && ( -1 == WP_MEMORY_LIMIT || ( $current_limit_int < abs( intval( WP_MEMORY_LIMIT ) ) ) ) ) 45 51 @ini_set( 'memory_limit', WP_MEMORY_LIMIT ); 46 52 } 47 53