This commit is contained in:
Dane Everitt 2017-12-30 19:56:42 -06:00
parent 1eaf1e3571
commit 10e2e6e379
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
5 changed files with 45 additions and 31 deletions

View file

@ -1,11 +1,4 @@
<?php
/**
* Pterodactyl - Panel
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
*
* This software is licensed under the terms of the MIT license.
* https://opensource.org/licenses/MIT
*/
namespace Pterodactyl\Services\Eggs\Variables;
@ -49,7 +42,7 @@ class VariableCreationService
));
}
$options = array_get($data, 'options', []);
$options = array_get($data, 'options') ?? [];
return $this->repository->create(array_merge($data, [
'egg_id' => $egg,

View file

@ -1,11 +1,4 @@
<?php
/**
* Pterodactyl - Panel
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
*
* This software is licensed under the terms of the MIT license.
* https://opensource.org/licenses/MIT
*/
namespace Pterodactyl\Services\Eggs\Variables;
@ -69,7 +62,7 @@ class VariableUpdateService
}
}
$options = array_get($data, 'options', []);
$options = array_get($data, 'options') ?? [];
return $this->repository->withoutFresh()->update($variable->id, array_merge($data, [
'user_viewable' => in_array('user_viewable', $options),