Skip to content

Commit

Permalink
minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
aristath committed Jul 25, 2023
1 parent 3a78bc3 commit 8d58ffc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
3 changes: 0 additions & 3 deletions src/wp-includes/sqlite/class-wp-sqlite-db.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ class WP_SQLite_DB extends wpdb {
/**
* Database Handle
*
* @access protected
*
* @var WP_SQLite_Translator
*/
protected $dbh;
Expand Down Expand Up @@ -315,7 +313,6 @@ public function query( $query ) {
* This overrides wpdb::load_col_info(), which uses a mysql function.
*
* @see wpdb::load_col_info()
* @access protected
*/
protected function load_col_info() {
if ( $this->col_info ) {
Expand Down
13 changes: 4 additions & 9 deletions src/wp-includes/sqlite/class-wp-sqlite-translator.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ class WP_SQLite_Translator {
/**
* Class variable to reference to the PDO instance.
*
* @access private
*
* @var PDO object
*/
private $pdo;
Expand Down Expand Up @@ -180,8 +178,6 @@ class WP_SQLite_Translator {
/**
* Class variable to store the result of the query.
*
* @access private
*
* @var array reference to the PHP object
*/
private $results = null;
Expand All @@ -196,17 +192,13 @@ class WP_SQLite_Translator {
/**
* Class variable to store the file name and function to cause error.
*
* @access private
*
* @var array
*/
private $errors;

/**
* Class variable to store the error messages.
*
* @access private
*
* @var array
*/
private $error_messages = array();
Expand All @@ -215,7 +207,6 @@ class WP_SQLite_Translator {
* Class variable to store the affected row id.
*
* @var int integer
* @access private
*/
private $last_insert_id;

Expand Down Expand Up @@ -2424,6 +2415,10 @@ private function strip_sqlite_system_tables( $tables ) {
array_filter(
$tables,
function ( $table ) {
// Bail early if $table is not an object.
if ( ! is_object( $table ) ) {
return true;
}
$table_name = property_exists( $table, 'Name' ) ? $table->Name : $table->table_name; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
return ! array_key_exists( $table_name, $this->sqlite_system_tables );
},
Expand Down

0 comments on commit 8d58ffc

Please sign in to comment.