Compare commits

...

3 Commits

Author SHA1 Message Date
Chris Hunt
c6bed7d0d4 Retry tests 2025-09-10 15:55:08 +01:00
Chris Hunt
8185064e41 Update file check 2025-09-10 15:21:37 +01:00
Chris Hunt
d6f813ccbf Update item withough password fixes #1493 2025-09-10 15:17:46 +01:00

View File

@@ -267,9 +267,10 @@ class ItemController extends Controller
],
];
$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'];
@@ -312,7 +313,11 @@ class ItemController extends Controller
$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);
}