mirror of
https://github.com/linuxserver/Heimdall.git
synced 2026-02-26 22:50:32 +09:00
Compare commits
3 Commits
2.x
...
bugfix/ite
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6bed7d0d4 | ||
|
|
8185064e41 | ||
|
|
d6f813ccbf |
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user