aboutsummaryrefslogtreecommitdiffstats
path: root/include/photo/photo_gd.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-04-29 19:52:31 -0700
committerfriendica <info@friendica.com>2013-04-29 19:52:31 -0700
commitd63de4dbe2bec1341122dc85de5430c81bcef46f (patch)
tree05b03e096fc87c0b99131e5b11043eb2e0800a14 /include/photo/photo_gd.php
parent641e69ef7f3d82a1ebf2047b80d282d5c0c87af9 (diff)
downloadvolse-hubzilla-d63de4dbe2bec1341122dc85de5430c81bcef46f.tar.gz
volse-hubzilla-d63de4dbe2bec1341122dc85de5430c81bcef46f.tar.bz2
volse-hubzilla-d63de4dbe2bec1341122dc85de5430c81bcef46f.zip
don't try and load an empty string as a photo
Diffstat (limited to 'include/photo/photo_gd.php')
-rw-r--r--include/photo/photo_gd.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/photo/photo_gd.php b/include/photo/photo_gd.php
index a32bd2816..466f8c23a 100644
--- a/include/photo/photo_gd.php
+++ b/include/photo/photo_gd.php
@@ -17,6 +17,9 @@ class photo_gd extends photo_driver {
function load($data, $type) {
$this->valid = false;
+ if(! $data)
+ return;
+
$this->image = @imagecreatefromstring($data);
if($this->image !== FALSE) {
$this->valid = true;