Support G shorthand for WP_MEMORY_LIMIT. see #23251.
git-svn-id: https://develop.svn.wordpress.org/trunk@25685 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d4f0c8604a
commit
83a69a16d2
@ -44,8 +44,11 @@ function wp_initial_constants() {
|
||||
$current_limit_int = intval( $current_limit );
|
||||
if ( false !== stripos( $current_limit, 'G' ) )
|
||||
$current_limit_int *= 1024;
|
||||
$wp_limit_int = intval( WP_MEMORY_LIMIT );
|
||||
if ( false !== stripos( WP_MEMORY_LIMIT, 'G' ) )
|
||||
$wp_limit_int *= 1024;
|
||||
|
||||
if ( -1 != $current_limit && ( -1 == WP_MEMORY_LIMIT || ( $current_limit_int < abs( intval( WP_MEMORY_LIMIT ) ) ) ) )
|
||||
if ( -1 != $current_limit && ( -1 == WP_MEMORY_LIMIT || $current_limit_int < $wp_limit_int ) )
|
||||
@ini_set( 'memory_limit', WP_MEMORY_LIMIT );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user