diff --git a/mailpoet/lib/Doctrine/WPDB/Connection.php b/mailpoet/lib/Doctrine/WPDB/Connection.php index c38a7b2865..3554b9d64b 100644 --- a/mailpoet/lib/Doctrine/WPDB/Connection.php +++ b/mailpoet/lib/Doctrine/WPDB/Connection.php @@ -109,7 +109,7 @@ class Connection implements ServerInfoAwareConnection { private function runQuery(string $sql) { global $wpdb; try { - $value = $wpdb->query($sql); // phpcs:ignore WordPressDotOrg.sniffs.DirectDB.UnescapedDBParameter,WordPress.DB.PreparedSQL.NotPrepared -- The variable is prepared but the sniff recognize only a string + $value = $wpdb->query($sql); // phpcs:ignore WordPressDotOrg.sniffs.DirectDB.UnescapedDBParameter,WordPress.DB.PreparedSQL.NotPrepared } catch (Throwable $e) { if ($e instanceof PDOException) { throw new QueryException($e->getMessage(), $e->errorInfo[0] ?? null, $e->errorInfo[1] ?? 0); diff --git a/mailpoet/lib/Doctrine/WPDB/Statement.php b/mailpoet/lib/Doctrine/WPDB/Statement.php index b2ac02ec69..52a74722be 100644 --- a/mailpoet/lib/Doctrine/WPDB/Statement.php +++ b/mailpoet/lib/Doctrine/WPDB/Statement.php @@ -62,7 +62,9 @@ class Statement implements StatementInterface { $values = $visitor->getValues(); global $wpdb; - $query = count($values) > 0 ? $wpdb->prepare($sql, $values) : $sql; // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared -- The prepare method is used here to escape the values + $query = count($values) > 0 + ? $wpdb->prepare($sql, $values) // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared + : $sql; return $this->connection->query($query); } }