Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions classes/class-db-driver-wpdb.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ public function insert_record( $data ) {
// Insert record meta.
foreach ( (array) $meta as $key => $vals ) {
foreach ( (array) $vals as $val ) {
if ( is_scalar( $val ) && '' !== $val ) {
$this->insert_meta( $record_id, $key, $val );
}
$this->insert_meta( $record_id, $key, $val );
}
}

Expand Down
10 changes: 4 additions & 6 deletions classes/class-log.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,10 @@ public function log( $connector, $message, $args, $object_id, $context, $action,
}

// Prevent any meta with null values from being logged.
$stream_meta = array_filter(
$args,
function ( $var ) {
return ! is_null( $var );
}
);
//
// @see https://www.php.net/manual/en/function.array-filter.php#111091
$stream_meta = array_filter( $args, 'strlen' );
$user_meta = array_filter( $user_meta, 'strlen' );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lkraav Were you able to confirm that this works with the nested $user_meta array?


// Add user meta to Stream meta.
$stream_meta['user_meta'] = $user_meta;
Expand Down