close #841
This commit is contained in:
parent
1eaf1e3571
commit
10e2e6e379
5 changed files with 45 additions and 31 deletions
|
@ -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,
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue