File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ];
You can’t perform that action at this time.
0 commit comments