From 92b50ca7ae04a578f082aaf8c88f26a72466eabc Mon Sep 17 00:00:00 2001 From: snipe Date: Mon, 3 Nov 2025 14:10:27 +0000 Subject: [PATCH] Addresses #17994, #16925 --- app/Models/Asset.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/Asset.php b/app/Models/Asset.php index ea19ea836e..d588690ba4 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -282,7 +282,7 @@ class Asset extends Depreciable protected function warrantyExpires(): Attribute { return Attribute:: make( - get: fn(mixed $value, array $attributes) => ($attributes['warranty_months'] && $attributes['purchase_date']) ? Carbon::parse($attributes['purchase_date'])->addMonths($attributes['warranty_months']) : null, + get: fn(mixed $value, array $attributes) => ($attributes['warranty_months'] && $attributes['purchase_date']) ? Carbon::parse($attributes['purchase_date'])->addMonths((int)$attributes['warranty_months']) : null, ); }