Make WordPress Core

Changeset 58937


Ignore:
Timestamp:
08/26/2024 08:12:24 PM (2 years ago)
Author:
flixos90
Message:

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

Props eclare, dd32, pbearne.
Fixes #36426.

File:
1 edited

Legend:

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

    r58017 r58937  
    5959                } elseif ( -1 === $current_limit_int || $current_limit_int > 268435456 /* = 256M */ ) {
    6060                        define( 'WP_MAX_MEMORY_LIMIT', $current_limit );
     61                } elseif ( wp_convert_hr_to_bytes( WP_MEMORY_LIMIT ) > 268435456 /* = 256M */ ) {
     62                        define( 'WP_MAX_MEMORY_LIMIT', WP_MEMORY_LIMIT );
    6163                } else {
    6264                        define( 'WP_MAX_MEMORY_LIMIT', '256M' );
Note: See TracChangeset for help on using the changeset viewer.