Skip to content

Commit

Permalink
Compare intval, since -1 can sometimes be a string
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Jun 14, 2017
1 parent fbbc56f commit 88b8287
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/wp-background-process.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ protected function get_memory_limit() {
$memory_limit = '128M';
}

if ( ! $memory_limit || -1 === $memory_limit ) {
if ( ! $memory_limit || -1 === intval( $memory_limit ) ) {
// Unlimited, set to 32GB.
$memory_limit = '32000M';
}
Expand Down

0 comments on commit 88b8287

Please sign in to comment.