From 9cb30f59dbbdb719ea719aac2b39b45056f1ff6c Mon Sep 17 00:00:00 2001 From: ralf Date: Mon, 17 Oct 2022 12:11:59 +0200 Subject: [PATCH] fix error deleting links to files (they have negative ids!) --- api/src/Etemplate/Widget/Link.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/Etemplate/Widget/Link.php b/api/src/Etemplate/Widget/Link.php index c208aaea09..6b1ace20b4 100644 --- a/api/src/Etemplate/Widget/Link.php +++ b/api/src/Etemplate/Widget/Link.php @@ -320,7 +320,7 @@ class Link extends Etemplate\Widget */ public static function ajax_delete(int $value) { - if ($value <= 0) + if (!$value) { throw new InvalidArgumentException(); }