From d6f813ccbfa6c865390d9e47a0c5adf480c341f7 Mon Sep 17 00:00:00 2001 From: Chris Hunt Date: Wed, 10 Sep 2025 15:17:46 +0100 Subject: [PATCH 1/3] Update item withough password fixes #1493 --- app/Http/Controllers/ItemController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/ItemController.php b/app/Http/Controllers/ItemController.php index 0d87ba297..4b587bdb4 100644 --- a/app/Http/Controllers/ItemController.php +++ b/app/Http/Controllers/ItemController.php @@ -312,7 +312,11 @@ public static function storelogic(Request $request, $id = null): Item $storedConfigObject = json_decode($storedItem->getAttribute('description')); $configObject = json_decode($config); - $configObject->password = $storedConfigObject->password; + if ($storedConfigObject && property_exists($storedConfigObject, 'password')) { + $configObject->password = $storedConfigObject->password; + } else { + $configObject->password = null; + } $config = json_encode($configObject); } From 8185064e41ff90b33350a8b93b53fec71cd09ae8 Mon Sep 17 00:00:00 2001 From: Chris Hunt Date: Wed, 10 Sep 2025 15:21:37 +0100 Subject: [PATCH 2/3] Update file check --- app/Http/Controllers/ItemController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/ItemController.php b/app/Http/Controllers/ItemController.php index 4b587bdb4..3c954e0b5 100644 --- a/app/Http/Controllers/ItemController.php +++ b/app/Http/Controllers/ItemController.php @@ -269,7 +269,7 @@ public static function storelogic(Request $request, $id = null): Item $file = $request->input('icon'); $path_parts = pathinfo($file); - if (!isset($path_parts['extension'])) { + if (!array_key_exists('extension', $path_parts)) { throw ValidationException::withMessages(['file' => 'Icon URL must have a valid file extension.']); } $extension = $path_parts['extension']; From c6bed7d0d423df4bba7d8288413666e13db013ca Mon Sep 17 00:00:00 2001 From: Chris Hunt Date: Wed, 10 Sep 2025 15:55:08 +0100 Subject: [PATCH 3/3] Retry tests --- app/Http/Controllers/ItemController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Http/Controllers/ItemController.php b/app/Http/Controllers/ItemController.php index 3c954e0b5..ed39c48c9 100644 --- a/app/Http/Controllers/ItemController.php +++ b/app/Http/Controllers/ItemController.php @@ -267,6 +267,7 @@ public static function storelogic(Request $request, $id = null): Item ], ]; + $file = $request->input('icon'); $path_parts = pathinfo($file); if (!array_key_exists('extension', $path_parts)) {