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
This commit is contained in:
parent
50b9880d2d
commit
53cf70a071
@ -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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user