diff --git a/api/src/Etemplate/Widget/Link.php b/api/src/Etemplate/Widget/Link.php index 1892b8363d..970cee5a81 100644 --- a/api/src/Etemplate/Widget/Link.php +++ b/api/src/Etemplate/Widget/Link.php @@ -314,7 +314,7 @@ class Link extends Etemplate\Widget } else { - if(!str_ends_with($dest_file, '/') && count($files) == 1) + if($dest_file && !str_ends_with($dest_file, '/') && count($files) == 1) { // 1 file to a specific filename, overwrite if already there if(file_exists(Api\Link::vfs_path($app, $id)))