X-Git-Url: https://dev.renevier.net/gitweb.cgi?p=syp.git;a=blobdiff_plain;f=api.php;h=50e8bfe3cfa2cc5cc1fad902cc24cde9757d03e8;hp=6ed26c9712435eec3dad280935df78b5c4023c65;hb=4acc8da49e3d4083fd9906388dd8fe0212bb9f42;hpb=e4a4e5149d55cf01a86f26392c52fdca803654ce diff --git a/api.php b/api.php index 6ed26c9..50e8bfe 100644 --- a/api.php +++ b/api.php @@ -116,6 +116,9 @@ function img_check_upload ($file) { } function delete_image_if_unused ($imgpath, $con) { + if (!isset ($imgpath) || (strlen ($imgpath) == 0)) { + return; + } if ($con->imgpath_exists ($imgpath)) { return false; }