aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-05-11 22:57:12 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-05-11 22:57:12 -0700
commitf2a0dac653f9f372129f373104cf5cf56c108b1f (patch)
treed2c2293ff21baf810348cf22420beffece4922ce /include/network.php
parentaeb69dcbbe38bc2058ebf43305e27d354fa21f9b (diff)
downloadvolse-hubzilla-f2a0dac653f9f372129f373104cf5cf56c108b1f.tar.gz
volse-hubzilla-f2a0dac653f9f372129f373104cf5cf56c108b1f.tar.bz2
volse-hubzilla-f2a0dac653f9f372129f373104cf5cf56c108b1f.zip
fix a couple of miscellaneous errors which showed up in the logs
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/network.php b/include/network.php
index a0782692e..e0c8885fd 100644
--- a/include/network.php
+++ b/include/network.php
@@ -603,7 +603,7 @@ function scale_external_images($s, $include_link = true, $scale_replace = false)
$scaled = str_replace($scale_replace[0], $scale_replace[1], $mtch[3]);
else
$scaled = $mtch[3];
- $i = z_fetch_url($scaled);
+ $i = z_fetch_url($scaled,true);
$cache = get_config('system','itemcache');
@@ -613,7 +613,10 @@ function scale_external_images($s, $include_link = true, $scale_replace = false)
}
// guess mimetype from headers or filename
+
$type = guess_image_type($mtch[3],$i['header']);
+ if(strpos($type,'image') === false)
+ continue;
if($i['success']) {
$ph = photo_factory($i['body'], $type);