From d63de4dbe2bec1341122dc85de5430c81bcef46f Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 29 Apr 2013 19:52:31 -0700 Subject: don't try and load an empty string as a photo --- include/photo/photo_gd.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/photo/photo_gd.php') 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; -- cgit v1.2.3