aboutsummaryrefslogtreecommitdiffstats
path: root/include/network.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-01-15 13:23:28 +0100
committerMario Vavti <mario@mariovavti.com>2017-01-15 13:23:28 +0100
commita36d74dad5dbc080007ba85d841ee0f74c9c919d (patch)
tree1bf8b894c36d26256be31ff0bafa8b96f2045e4d /include/network.php
parente843d27f8c4cd3ecabc3598a92db0c814f4d0ed7 (diff)
downloadvolse-hubzilla-a36d74dad5dbc080007ba85d841ee0f74c9c919d.tar.gz
volse-hubzilla-a36d74dad5dbc080007ba85d841ee0f74c9c919d.tar.bz2
volse-hubzilla-a36d74dad5dbc080007ba85d841ee0f74c9c919d.zip
do not choke if photo_factory() returns null
Diffstat (limited to 'include/network.php')
-rw-r--r--include/network.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/network.php b/include/network.php
index 451ce12a1..d571ec2ce 100644
--- a/include/network.php
+++ b/include/network.php
@@ -714,6 +714,10 @@ function scale_external_images($s, $include_link = true, $scale_replace = false)
if($i['success']) {
$ph = photo_factory($i['body'], $type);
+
+ if(! is_object($ph))
+ continue;
+
if($ph->is_valid()) {
$orig_width = $ph->getWidth();
$orig_height = $ph->getHeight();