diff --git a/facebook/facebook.php b/facebook/facebook.php index 51f1fc84..b9f42859 100644 --- a/facebook/facebook.php +++ b/facebook/facebook.php @@ -1090,15 +1090,15 @@ function facebook_post_hook(&$a,&$b) { } // Fallback - if message is empty + if(!strlen($msg)) + $msg = $linkname; + if(!strlen($msg)) $msg = $link; if(!strlen($msg)) $msg = $image; - if(!strlen($msg)) - $msg = $linkname; - // If there is nothing to post then exit if(!strlen($msg)) return; diff --git a/privacy_image_cache/privacy_image_cache.php b/privacy_image_cache/privacy_image_cache.php index cd8a65f8..b757c783 100644 --- a/privacy_image_cache/privacy_image_cache.php +++ b/privacy_image_cache/privacy_image_cache.php @@ -51,6 +51,9 @@ function privacy_image_cache_init() { } else { require_once("Photo.php"); + // It shouldn't happen but it does - spaces in URL + $_REQUEST['url'] = str_replace(" ", "+", $_REQUEST['url']); + $img_str = fetch_url($_REQUEST['url'],true); $tempfile = tempnam("", "cache");