Add null protection.

This commit is contained in:
Vedanshu Jain 2023-04-14 14:24:09 +05:30
parent 5bebfdf87f
commit dfdc2d3d8c
1 changed files with 1 additions and 1 deletions

View File

@ -718,7 +718,7 @@ WHERE $where_clause
}
foreach ( $results as $index => $result_row ) {
$source_id = $result_row[ $this->schema_config['source']['entity']['table_name'] . '_' . $this->schema_config['source']['entity']['primary_key'] ];
$results[ $index ] = array_merge( $result_row, $source_metadata_rows[ $source_id ] );
$results[ $index ] = array_merge( $result_row, ( $source_metadata_rows[ $source_id ] ?? array() ) );
}
return $results;
}