From 4557108805ca2140ebdf86f91eddc4858c4ff2f5 Mon Sep 17 00:00:00 2001 From: Jared Burke Date: Mon, 15 Oct 2018 01:26:45 -0500 Subject: [PATCH] Fix some memory limit values not correctly converting to bytes --- includes/abstracts/class-wc-background-process.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/abstracts/class-wc-background-process.php b/includes/abstracts/class-wc-background-process.php index 0de4abe6ba7..6d9662208fc 100644 --- a/includes/abstracts/class-wc-background-process.php +++ b/includes/abstracts/class-wc-background-process.php @@ -146,10 +146,10 @@ abstract class WC_Background_Process extends WP_Background_Process { if ( ! $memory_limit || -1 === intval( $memory_limit ) ) { // Unlimited, set to 32GB. - $memory_limit = '32000M'; + $memory_limit = '32G'; } - return intval( $memory_limit ) * 1024 * 1024; + return wp_convert_hr_to_bytes( $memory_limit ); } /**