From bafe7f80f05f183840d87e6e0d108ef0d9bc737a Mon Sep 17 00:00:00 2001 From: "Ian M. Jones" Date: Thu, 30 Jul 2020 16:48:05 +0100 Subject: [PATCH] Fix queue not being processed when PHP memory limit set with G rather than M suffix. --- src/WP_Queue/Cron.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WP_Queue/Cron.php b/src/WP_Queue/Cron.php index 5bb2b40..e4538d9 100644 --- a/src/WP_Queue/Cron.php +++ b/src/WP_Queue/Cron.php @@ -165,12 +165,12 @@ protected function get_memory_limit() { $memory_limit = '256M'; } - if ( ! $memory_limit || - 1 == $memory_limit ) { + if ( ! $memory_limit || -1 == $memory_limit ) { // Unlimited, set to 1GB $memory_limit = '1000M'; } - return intval( $memory_limit ) * 1024 * 1024; + return wp_convert_hr_to_bytes( $memory_limit ); } /**