]> dev.renevier.net Git - syp.git/blobdiff - api.php
small code cleanup (indentation, missing copyrights, etc)
[syp.git] / api.php
diff --git a/api.php b/api.php
index 6ed26c9712435eec3dad280935df78b5c4023c65..50e8bfe3cfa2cc5cc1fad902cc24cde9757d03e8 100644 (file)
--- 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;
     }