Skip to content

Commit

Permalink
Broaden hack to effectively ignore unsupported variable select
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonpayton committed Apr 30, 2024
1 parent bdd1499 commit 21b0ad2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions wp-includes/sqlite/class-wp-sqlite-translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -1453,8 +1453,9 @@ private function execute_select() {
$updated_query = $this->get_information_schema_query( $updated_query );
$params = array();
} elseif (
strpos( $updated_query, '@@SESSION.sql_mode' ) !== false
|| strpos( $updated_query, 'CONVERT( ' ) !== false
// Examples: @@SESSION.sql_mode or @@GLOBAL.max_allowed_packet
preg_match( '/@@((SESSION|GLOBAL)\s*\.\s*)?\w+\b/i', $updated_query ) === 1 ||
strpos( $updated_query, 'CONVERT( ' ) !== false
) {
/*
* If the query contains a function that is not supported by SQLite,
Expand Down

0 comments on commit 21b0ad2

Please sign in to comment.