Skip to content

Commit 180bf62

Browse files
committed
fix PHP notice when there are no user tasks
1 parent ef11369 commit 180bf62

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

classes/suggested-tasks/providers/class-user.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function add_task_actions( $data = [], $actions = [] ) {
112112
*/
113113
public function modify_task_details_for_user_tasks_rest_format( $tasks, $args ) {
114114
static $modified_tasks = [];
115-
if ( ! isset( $args['include_provider'] ) || ! \in_array( 'user', $args['include_provider'], true ) ) {
115+
if ( ! isset( $tasks['user'] ) || ! isset( $args['include_provider'] ) || ! \in_array( 'user', $args['include_provider'], true ) ) {
116116
return $tasks;
117117
}
118118
foreach ( $tasks['user'] as $key => $task ) {

0 commit comments

Comments
 (0)