Skip to content

Commit 704584d

Browse files
authored
Merge branch 'develop' into filip/v18/set-date-format
2 parents 59e5fff + 22914dd commit 704584d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

classes/update/class-update-161.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ private function migrate_task( $task ) {
101101
if ( 'user' === $task['provider_id'] ) {
102102
// User tasks have different data structure, so we can copy directly.
103103
$task_details = [
104-
'post_title' => $task['title'],
104+
'post_title' => isset( $task['title'] ) ? $task['title'] : '',
105105
'description' => '',
106-
'points' => $task['points'],
106+
'points' => isset( $task['points'] ) ? $task['points'] : 0,
107107
'provider_id' => 'user',
108108
'category' => 'user',
109-
'task_id' => $task['task_id'],
110-
'post_status' => 'pending' === $task['status'] ? 'publish' : $task['status'],
109+
'task_id' => isset( $task['task_id'] ) ? $task['task_id'] : '',
110+
'post_status' => ! isset( $task['status'] ) || 'pending' === $task['status'] ? 'publish' : $task['status'],
111111
'dismissable' => true,
112112
'snoozable' => false,
113113
];

0 commit comments

Comments
 (0)