From 7064d5629db0ed7907e430ee3b916f6b11c7bac1 Mon Sep 17 00:00:00 2001 From: "MEDIA.figaro" Date: Mon, 16 Jan 2017 20:11:10 +0100 Subject: [PATCH] Notice: Undefined index: email (#22) email may be undefined --- Slack/Client/Actions/UsersList.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Slack/Client/Actions/UsersList.php b/Slack/Client/Actions/UsersList.php index 815bd94..3519603 100644 --- a/Slack/Client/Actions/UsersList.php +++ b/Slack/Client/Actions/UsersList.php @@ -61,7 +61,7 @@ public function parseResponse(array $response) 'name' => $user['name'], 'deleted' => (bool)$user['deleted'], 'real_name' => $user['profile']['real_name'], - 'email' => $user['profile']['email'], + 'email' => isset($user['profile']['email']) ? $user['profile']['email'] : null, 'is_bot' => (bool)$user['is_bot'], 'presence' => isset($user['presence']) ? $user['presence'] : null ];