Skip to content

Commit 040e014

Browse files
committed
Use PDO attribute rather than query for SQLite version
1 parent aa36063 commit 040e014

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wp-includes/sqlite-ast/class-wp-pdo-mysql-on-sqlite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ public function get_connection(): WP_SQLite_Connection {
849849
* @return string SQLite engine version as a string.
850850
*/
851851
public function get_sqlite_version(): string {
852-
return $this->connection->query( 'SELECT SQLITE_VERSION()' )->fetchColumn();
852+
return $this->connection->get_pdo()->getAttribute( PDO::ATTR_SERVER_VERSION );
853853
}
854854

855855
/**

0 commit comments

Comments
 (0)