From 90818bb1479aeb2bc7a7ff2409707f9ba41422a1 Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Mon, 3 Jun 2024 15:58:57 +0100 Subject: [PATCH] Don't save next autoincrement base if it's going to fail, next --- app/Observers/AssetObserver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Observers/AssetObserver.php b/app/Observers/AssetObserver.php index 8fcf2485a3..704eb52e42 100644 --- a/app/Observers/AssetObserver.php +++ b/app/Observers/AssetObserver.php @@ -92,7 +92,7 @@ class AssetObserver // only modify the 'next' one if it's *bigger* than the stored base // - if($next_asset_tag > $settings->next_auto_tag_base) { + if ($next_asset_tag > $settings->next_auto_tag_base && $next_asset_tag < PHP_INT_MAX) { $settings->next_auto_tag_base = $next_asset_tag; $settings->save(); }