11<?php
2- /**
3- * Pterodactyl - Panel
4- * Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
5- *
6- * This software is licensed under the terms of the MIT license.
7- * https://opensource.org/licenses/MIT
8- */
92
103namespace Pterodactyl \Services \Servers ;
114
@@ -113,6 +106,7 @@ public function getBuild($attribute = null)
113106 *
114107 * @throws \Pterodactyl\Exceptions\DisplayException
115108 * @throws \Pterodactyl\Exceptions\Model\DataValidationException
109+ * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
116110 */
117111 public function handle ($ server , array $ data )
118112 {
@@ -138,11 +132,11 @@ public function handle($server, array $data)
138132 }
139133
140134 $ server = $ this ->repository ->update ($ server ->id , [
141- 'memory ' => array_get ($ data , 'memory ' , $ server ->memory ),
142- 'swap ' => array_get ($ data , 'swap ' , $ server ->swap ),
143- 'io ' => array_get ($ data , 'io ' , $ server ->io ),
144- 'cpu ' => array_get ($ data , 'cpu ' , $ server ->cpu ),
145- 'disk ' => array_get ($ data , 'disk ' , $ server ->disk ),
135+ 'memory ' => ( int ) array_get ($ data , 'memory ' , $ server ->memory ),
136+ 'swap ' => ( int ) array_get ($ data , 'swap ' , $ server ->swap ),
137+ 'io ' => ( int ) array_get ($ data , 'io ' , $ server ->io ),
138+ 'cpu ' => ( int ) array_get ($ data , 'cpu ' , $ server ->cpu ),
139+ 'disk ' => ( int ) array_get ($ data , 'disk ' , $ server ->disk ),
146140 'allocation_id ' => array_get ($ data , 'allocation_id ' , $ server ->allocation_id ),
147141 ]);
148142
0 commit comments