From 53cf70a071088f8401d3a13dd61167faa8dbe9dd Mon Sep 17 00:00:00 2001 From: shish Date: Sat, 27 Oct 2007 23:55:53 +0000 Subject: [PATCH] if source is empty, set it to null (branch_2.1) git-svn-id: file:///home/shish/svn/shimmie2/branches/branch_2.1@583 7f39781d-f577-437e-ae19-be835c7a54ca --- ext/image/main.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ext/image/main.php b/ext/image/main.php index a888f357..7f3ca750 100644 --- a/ext/image/main.php +++ b/ext/image/main.php @@ -170,6 +170,9 @@ class ImageIO extends Extension { /* * Validate things */ + if(strlen(trim($image->source)) == 0) { + $image->source = null; + } if(!empty($image->source)) { if(!preg_match("#^(https?|ftp)://#", $image->source)) { $error = "Image's source isn't a valid URL";