mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-10 21:00:59 +01:00
Coding Standards: Use a human-readable constant in the check for max memory limit.
Follow-up to [35286], [38011], [38015], [58937]. See #61607. Built from https://develop.svn.wordpress.org/trunk@58938 git-svn-id: http://core.svn.wordpress.org/trunk@58334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ddd7f2142e
commit
3014749ed9
@ -56,9 +56,9 @@ function wp_initial_constants() {
|
||||
if ( ! defined( 'WP_MAX_MEMORY_LIMIT' ) ) {
|
||||
if ( false === wp_is_ini_value_changeable( 'memory_limit' ) ) {
|
||||
define( 'WP_MAX_MEMORY_LIMIT', $current_limit );
|
||||
} elseif ( -1 === $current_limit_int || $current_limit_int > 268435456 /* = 256M */ ) {
|
||||
} elseif ( -1 === $current_limit_int || $current_limit_int > 256 * MB_IN_BYTES ) {
|
||||
define( 'WP_MAX_MEMORY_LIMIT', $current_limit );
|
||||
} elseif ( wp_convert_hr_to_bytes( WP_MEMORY_LIMIT ) > 268435456 /* = 256M */ ) {
|
||||
} elseif ( wp_convert_hr_to_bytes( WP_MEMORY_LIMIT ) > 256 * MB_IN_BYTES ) {
|
||||
define( 'WP_MAX_MEMORY_LIMIT', WP_MEMORY_LIMIT );
|
||||
} else {
|
||||
define( 'WP_MAX_MEMORY_LIMIT', '256M' );
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.7-alpha-58937';
|
||||
$wp_version = '6.7-alpha-58938';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user