Permalink
Browse files

Merge pull request #44 from mikejolley/fix/like-query

Fix like query wildcards
  • Loading branch information...
A5hleyRich committed Feb 12, 2018
2 parents a3f3a1f + ef97ca1 commit e435cd5b77d22cd28d5b6acb5427f566932963f8
Showing with 3 additions and 3 deletions.
  1. +3 −3 classes/wp-background-process.php
@@ -195,7 +195,7 @@ protected function is_queue_empty() {
$column = 'meta_key';
}
$key = $this->identifier . '_batch_%';
$key = $wpdb->esc_like( $this->identifier . '_batch_' ) . '%';
$count = $wpdb->get_var( $wpdb->prepare( "
SELECT COUNT(*)
@@ -270,7 +270,7 @@ protected function get_batch() {
$value_column = 'meta_value';
}
$key = $this->identifier . '_batch_%';
$key = $wpdb->esc_like( $this->identifier . '_batch_' ) . '%';
$query = $wpdb->get_row( $wpdb->prepare( "
SELECT *
@@ -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';
}

0 comments on commit e435cd5

Please sign in to comment.