Don't trigger a 500 error due to unchecked data being inserted; closes #2087

This also clears up allowed values for the disk input and normalizes the messaging between edit and create screens.
This commit is contained in:
Dane Everitt 2020-06-23 20:24:09 -07:00
parent 497f73d820
commit 4a0627d182
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
4 changed files with 20 additions and 14 deletions

View file

@ -71,8 +71,8 @@ class BuildModificationService
* @return \Pterodactyl\Models\Server
*
* @throws \Pterodactyl\Exceptions\DisplayException
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
*/
public function handle(Server $server, array $data)
{
@ -91,7 +91,7 @@ class BuildModificationService
}
}
/** @var \Pterodactyl\Models\Server $server */
/* @var \Pterodactyl\Models\Server $server */
$server = $this->repository->withFreshModel()->update($server->id, [
'oom_disabled' => array_get($data, 'oom_disabled'),
'memory' => array_get($data, 'memory'),