if source is empty, set it to null
git-svn-id: file:///home/shish/svn/shimmie2/trunk@582 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
25509b15b8
commit
d2c1ec66a9
@ -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