From 1f9c353bae20813e7ac9a5bbc85c5d66d00a1699 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 22 Jul 2018 06:41:30 +0000 Subject: [PATCH 1/2] And again some removed notices --- pumpio/pumpio.php | 2 +- xmpp/xmpp.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index 191f8505..14ce1396 100644 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -1391,7 +1391,7 @@ function pumpio_getallusers(&$a, $uid) } } - if (is_array($users->items)) { + if (!empty($users->items)) { foreach ($users->items AS $user) { pumpio_get_contact($uid, $user); } diff --git a/xmpp/xmpp.php b/xmpp/xmpp.php index bef31fed..cda66291 100644 --- a/xmpp/xmpp.php +++ b/xmpp/xmpp.php @@ -94,7 +94,7 @@ function xmpp_addon_settings(App $a, &$s) function xmpp_login() { - if (!$_SESSION["allow_api"]) { + if (isset($_SESSION["allow_api"]) && !$_SESSION["allow_api"]) { $password = random_string(16); PConfig::set(local_user(), "xmpp", "password", $password); } From a10a8361a7a0e566af6215fc129ebf2ca11a7ba1 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 22 Jul 2018 06:50:34 +0000 Subject: [PATCH 2/2] This will work --- xmpp/xmpp.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmpp/xmpp.php b/xmpp/xmpp.php index cda66291..e93ce9d5 100644 --- a/xmpp/xmpp.php +++ b/xmpp/xmpp.php @@ -94,7 +94,7 @@ function xmpp_addon_settings(App $a, &$s) function xmpp_login() { - if (isset($_SESSION["allow_api"]) && !$_SESSION["allow_api"]) { + if (empty($_SESSION["allow_api"])) { $password = random_string(16); PConfig::set(local_user(), "xmpp", "password", $password); }