From 3014749ed9fe084b1a8eaafcbe72f133754b7081 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 26 Aug 2024 20:57:13 +0000 Subject: [PATCH] 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 --- wp-includes/default-constants.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/default-constants.php b/wp-includes/default-constants.php index f1c0320a6f..71a21269dc 100644 --- a/wp-includes/default-constants.php +++ b/wp-includes/default-constants.php @@ -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' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 929903c120..30b20b665c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.