Skip to content

Commit d6f813c

Browse files
author
Chris Hunt
committed
Update item withough password fixes #1493
1 parent cd95fc3 commit d6f813c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

app/Http/Controllers/ItemController.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,11 @@ public static function storelogic(Request $request, $id = null): Item
312312
$storedConfigObject = json_decode($storedItem->getAttribute('description'));
313313

314314
$configObject = json_decode($config);
315-
$configObject->password = $storedConfigObject->password;
315+
if ($storedConfigObject && property_exists($storedConfigObject, 'password')) {
316+
$configObject->password = $storedConfigObject->password;
317+
} else {
318+
$configObject->password = null;
319+
}
316320

317321
$config = json_encode($configObject);
318322
}

0 commit comments

Comments
 (0)