From d00d6f65f01dd231013de2d2d3a4368ac2ea4e90 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 7 Oct 2021 10:44:23 +0200 Subject: [PATCH] fix PHP 8.0 error when deleting a Kanban card - link deletion failed when link_id was "" as in PHP 8.0 "" < 0 --> gave the error - link to card was never deleted as board_id is not stored in card --- api/src/Link.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/src/Link.php b/api/src/Link.php index 68298cfb91..386d01ca99 100644 --- a/api/src/Link.php +++ b/api/src/Link.php @@ -683,15 +683,15 @@ class Link extends Link\Storage { echo "

Link::unlink('$link_id','$app',".array2string($id).",'$owner','$app2','$id2', $hold_for_purge)

\n"; } - if ($link_id < 0) // vfs-link? + if ((int)$link_id < 0) // vfs-link? { return self::delete_attached(-$link_id); } - elseif ($app == self::VFS_APPNAME) + elseif ($app === self::VFS_APPNAME) { return self::delete_attached($app2,$id2,$id); } - elseif ($app2 == self::VFS_APPNAME) + elseif ($app2 === self::VFS_APPNAME) { return self::delete_attached($app,$id,$id2); }