Make WordPress Core


Ignore:
Timestamp:
10/03/2013 03:46:01 AM (11 years ago)
Author:
nacin
Message:

Support G shorthand for WP_MEMORY_LIMIT. see #23251.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/default-constants.php

    r25684 r25685  
    4545        if ( false !== stripos( $current_limit, 'G' ) )
    4646            $current_limit_int *= 1024;
    47 
    48         if ( -1 != $current_limit && ( -1 == WP_MEMORY_LIMIT || ( $current_limit_int < abs( intval( WP_MEMORY_LIMIT ) ) ) ) )
     47        $wp_limit_int = intval( WP_MEMORY_LIMIT );
     48        if ( false !== stripos( WP_MEMORY_LIMIT, 'G' ) )
     49            $wp_limit_int *= 1024;
     50
     51        if ( -1 != $current_limit && ( -1 == WP_MEMORY_LIMIT || $current_limit_int < $wp_limit_int ) )
    4952            @ini_set( 'memory_limit', WP_MEMORY_LIMIT );
    5053    }
Note: See TracChangeset for help on using the changeset viewer.