]> git.mxchange.org Git - friendica-addons.git/commitdiff
fbpost: Additional check for empty posts.
authorMichael Vogel <icarus@dabo.de>
Wed, 21 Jan 2015 00:26:20 +0000 (01:26 +0100)
committerMichael Vogel <icarus@dabo.de>
Wed, 21 Jan 2015 00:26:20 +0000 (01:26 +0100)
fbpost/fbpost.php

index 7c10d7c3b333511d4765db3db29082eda56d25d4..5fa6e431d5a420e3c9801d1813443d7ba74f5d21 100644 (file)
@@ -987,6 +987,7 @@ function fbpost_fetchwall($a, $uid) {
        require_once("include/network.php");
        require_once("include/items.php");
        require_once("mod/item.php");
+       require_once("include/bbcode.php");
 
        $access_token = get_pconfig($uid,'facebook','access_token');
        $post_to_page = get_pconfig($uid,'facebook','post_to_page');
@@ -1156,6 +1157,12 @@ function fbpost_fetchwall($a, $uid) {
                        continue;
                }
 
+               if(trim(strip_tags(bbcode($_REQUEST["body"], false, false))) == '') {
+                       logger('facebook: empty body 4 '.$item->id.' '.print_r($item, true));
+                       continue;
+               }
+
+
                //print_r($_REQUEST);
                logger('facebook: posting for user '.$uid);
                item_post($a);