From f356431cb562832a5af5593783e42cbb8e70ef10 Mon Sep 17 00:00:00 2001 From: Srini Vasudevan Date: Sat, 13 Feb 2021 11:17:36 +1100 Subject: [PATCH] return null rather than casting to int if the id is null --- app/Traits/Import.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Traits/Import.php b/app/Traits/Import.php index 15b5b290c..d855dc107 100644 --- a/app/Traits/Import.php +++ b/app/Traits/Import.php @@ -80,7 +80,7 @@ trait Import } } - return (int) $id; + return $id == null ? null : (int) $id; } public function getItemId($row)