From: Michael Date: Wed, 20 Mar 2019 06:17:04 +0000 (+0000) Subject: Avoid notices in buffer addon X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fe578cc4ce722e8c2fb7d9f72b96579400edfc1c;p=friendica-addons.git Avoid notices in buffer addon --- diff --git a/buffer/buffer.php b/buffer/buffer.php index 869260d3..84ea0be8 100644 --- a/buffer/buffer.php +++ b/buffer/buffer.php @@ -114,10 +114,10 @@ function buffer_connect(App $a) $buffer = new BufferApp($client_id, $client_secret, $callback_url); if (!$buffer->ok) { - $o .= 'Connect to Buffer!'; + $o = 'Connect to Buffer!'; } else { Logger::log("buffer_connect: authenticated"); - $o .= L10n::t("You are now authenticated to buffer. "); + $o = L10n::t("You are now authenticated to buffer. "); $o .= '
' . L10n::t("return to the connector page") . ''; PConfig::set(local_user(), 'buffer','access_token', $buffer->access_token); } @@ -236,8 +236,8 @@ function buffer_settings_post(App $a, array &$b) PConfig::set(local_user(), 'buffer', 'post' , false); PConfig::set(local_user(), 'buffer', 'post_by_default', false); } else { - PConfig::set(local_user(), 'buffer', 'post' , intval($_POST['buffer'])); - PConfig::set(local_user(), 'buffer', 'post_by_default', intval($_POST['buffer_bydefault'])); + PConfig::set(local_user(), 'buffer', 'post' , intval(defaults($_POST, 'buffer', false))); + PConfig::set(local_user(), 'buffer', 'post_by_default', intval(defaults($_POST, 'buffer_bydefault', false))); } } }