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
This commit is contained in:
Ralf Becker 2021-10-07 10:44:23 +02:00
parent 7c40fc0981
commit 7a93814c25

View File

@ -683,15 +683,15 @@ class Link extends Link\Storage
{
echo "<p>Link::unlink('$link_id','$app',".array2string($id).",'$owner','$app2','$id2', $hold_for_purge)</p>\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);
}