Use LIKE escaping from $wpdb
[MAILPOET-4055]
This commit is contained in:
@@ -67,7 +67,7 @@ class Migrator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function hasSchema(): bool {
|
public function hasSchema(): bool {
|
||||||
$pattern = str_replace('_', '\\_', $this->prefix) . '%';
|
$pattern = $this->wpdb->esc_like($this->prefix) . '%';
|
||||||
return $this->runQuery("SHOW TABLES LIKE '$pattern'") > 0;
|
return $this->runQuery("SHOW TABLES LIKE '$pattern'") > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user