Skip to content

Commit 0753b7c

Browse files
committed
Additional check to ensure that $table is an object
1 parent ec7028f commit 0753b7c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

wp-includes/sqlite/class-wp-sqlite-translator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2424,6 +2424,10 @@ private function strip_sqlite_system_tables( $tables ) {
24242424
array_filter(
24252425
$tables,
24262426
function ( $table ) {
2427+
// Bail early if $table is not an object.
2428+
if ( ! is_object( $table ) ) {
2429+
return true;
2430+
}
24272431
$table_name = property_exists( $table, 'Name' ) ? $table->Name : $table->table_name; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase
24282432
return ! array_key_exists( $table_name, $this->sqlite_system_tables );
24292433
},

0 commit comments

Comments
 (0)