Administration: Avoid using WP_MAX_MEMORY_LIMIT default that is smaller than WP_MEMORY_LIMIT.

Props eclare, dd32, pbearne.
Fixes #36426.

Built from https://develop.svn.wordpress.org/trunk@58937


git-svn-id: http://core.svn.wordpress.org/trunk@58333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Felix Arntz 2024-08-26 20:14:14 +00:00
parent 9e650efbb8
commit ddd7f2142e
2 changed files with 3 additions and 1 deletions

View File

@ -58,6 +58,8 @@ function wp_initial_constants() {
define( 'WP_MAX_MEMORY_LIMIT', $current_limit );
} elseif ( -1 === $current_limit_int || $current_limit_int > 268435456 /* = 256M */ ) {
define( 'WP_MAX_MEMORY_LIMIT', $current_limit );
} elseif ( wp_convert_hr_to_bytes( WP_MEMORY_LIMIT ) > 268435456 /* = 256M */ ) {
define( 'WP_MAX_MEMORY_LIMIT', WP_MEMORY_LIMIT );
} else {
define( 'WP_MAX_MEMORY_LIMIT', '256M' );
}

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.7-alpha-58936';
$wp_version = '6.7-alpha-58937';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.