Skip to content

Commit

Permalink
Prevent inserting empty meta values [1]
Browse files Browse the repository at this point in the history
  • Loading branch information
lkraav committed Feb 20, 2022
1 parent 489fb87 commit b712ef3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion classes/class-db-driver-wpdb.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ public function insert_record( $data ) {
// Insert record meta.
foreach ( (array) $meta as $key => $vals ) {
foreach ( (array) $vals as $val ) {
$this->insert_meta( $record_id, $key, $val );
if ( $val ) {
$this->insert_meta( $record_id, $key, $val );
}
}
}

Expand Down

0 comments on commit b712ef3

Please sign in to comment.