Skip to content

Commit

Permalink
Fix queue not being processed when PHP memory limit set with G rather…
Browse files Browse the repository at this point in the history
… than M suffix.
  • Loading branch information
ianmjones committed Jul 30, 2020
1 parent 8da3ef3 commit bafe7f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/WP_Queue/Cron.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

/**
Expand Down

0 comments on commit bafe7f8

Please sign in to comment.