From 19abd1a17e68e24dd4ddf78ed1292190288623e8 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 29 Aug 2018 18:04:03 +0000 Subject: [PATCH] Some removed notices --- ifttt/ifttt.php | 2 +- xmpp/xmpp.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ifttt/ifttt.php b/ifttt/ifttt.php index 55f46091..ddd64394 100644 --- a/ifttt/ifttt.php +++ b/ifttt/ifttt.php @@ -180,7 +180,7 @@ function ifttt_message($uid, $item) //$_REQUEST['date'] = $item['date']; //$_REQUEST['uri'] = $item['url']; - if (strstr($item['url'], 'facebook.com')) { + if (!empty($item['url']) && strstr($item['url'], 'facebook.com')) { $hash = hash('ripemd128', $item['url']); $_REQUEST['extid'] = Protocol::FACEBOOK; $_REQUEST['message_id'] = Item::newURI($uid, Protocol::FACEBOOK . ':' . $hash); diff --git a/xmpp/xmpp.php b/xmpp/xmpp.php index 41b02f06..e589f922 100644 --- a/xmpp/xmpp.php +++ b/xmpp/xmpp.php @@ -34,9 +34,9 @@ function xmpp_addon_settings_post() return; } - PConfig::set(local_user(), 'xmpp', 'enabled', intval($_POST['xmpp_enabled'])); - PConfig::set(local_user(), 'xmpp', 'individual', intval($_POST['xmpp_individual'])); - PConfig::set(local_user(), 'xmpp', 'bosh_proxy', $_POST['xmpp_bosh_proxy']); + PConfig::set(local_user(), 'xmpp', 'enabled', defaults($_POST, 'xmpp_enabled', false)); + PConfig::set(local_user(), 'xmpp', 'individual', defaults($_POST, 'xmpp_individual', false)); + PConfig::set(local_user(), 'xmpp', 'bosh_proxy', defaults($_POST, 'xmpp_bosh_proxy', '')); info(L10n::t('XMPP settings updated.') . EOL); }