diff --git a/src/wp-includes/sqlite/class-wp-sqlite-db.php b/src/wp-includes/sqlite/class-wp-sqlite-db.php index 1789cb90e0707..b3db03574924b 100644 --- a/src/wp-includes/sqlite/class-wp-sqlite-db.php +++ b/src/wp-includes/sqlite/class-wp-sqlite-db.php @@ -16,8 +16,6 @@ class WP_SQLite_DB extends wpdb { /** * Database Handle * - * @access protected - * * @var WP_SQLite_Translator */ protected $dbh; @@ -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 ) { diff --git a/src/wp-includes/sqlite/class-wp-sqlite-translator.php b/src/wp-includes/sqlite/class-wp-sqlite-translator.php index ab01d42bd7c03..4729f070a245c 100644 --- a/src/wp-includes/sqlite/class-wp-sqlite-translator.php +++ b/src/wp-includes/sqlite/class-wp-sqlite-translator.php @@ -31,8 +31,6 @@ class WP_SQLite_Translator { /** * Class variable to reference to the PDO instance. * - * @access private - * * @var PDO object */ private $pdo; @@ -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; @@ -196,8 +192,6 @@ class WP_SQLite_Translator { /** * Class variable to store the file name and function to cause error. * - * @access private - * * @var array */ private $errors; @@ -205,8 +199,6 @@ class WP_SQLite_Translator { /** * Class variable to store the error messages. * - * @access private - * * @var array */ private $error_messages = array(); @@ -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; @@ -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 ); },