]> git.mxchange.org Git - friendica-addons.git/commitdiff
Avoiding notices
authorMichael <heluecht@pirati.ca>
Sun, 13 Jan 2019 18:05:37 +0000 (18:05 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 13 Jan 2019 18:05:37 +0000 (18:05 +0000)
wppost/wppost.php

index 1cc27976aeec35f6e12125476839075528045582..d481d68fc3bf3915201455cb9f43165d8b5f0b06 100644 (file)
@@ -148,19 +148,17 @@ function wppost_settings(&$a,&$s) {
 function wppost_settings_post(&$a,&$b) {
 
        if(!empty($_POST['wppost-submit'])) {
-
                PConfig::set(local_user(),'wppost','post',intval($_POST['wppost']));
-               PConfig::set(local_user(),'wppost','post_by_default',intval($_POST['wp_bydefault']));
+               PConfig::set(local_user(),'wppost','post_by_default',intval(defaults($_POST, 'wp_bydefault', false)));
                PConfig::set(local_user(),'wppost','wp_username',trim($_POST['wp_username']));
                PConfig::set(local_user(),'wppost','wp_password',trim($_POST['wp_password']));
                PConfig::set(local_user(),'wppost','wp_blog',trim($_POST['wp_blog']));
-               PConfig::set(local_user(),'wppost','backlink',trim($_POST['wp_backlink']));
+               PConfig::set(local_user(),'wppost','backlink',trim(defaults($_POST, 'wp_backlink', '')));
                PConfig::set(local_user(),'wppost','shortcheck',trim($_POST['wp_shortcheck']));
                $wp_backlink_text = Strings::escapeTags(trim($_POST['wp_backlink_text']));
                $wp_backlink_text = BBCode::convert($wp_backlink_text, false, 8);
                $wp_backlink_text = HTML::toPlaintext($wp_backlink_text, 0, true);
                PConfig::set(local_user(),'wppost','wp_backlink_text', $wp_backlink_text);
-
        }
 
 }