Skip to content

Commit 7848f63

Browse files
committed
Fix error thrown on 0 values for variables, closes pterodactyl#223
1 parent 43786b1 commit 7848f63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Repositories/ServerRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public function create(array $data)
166166
foreach ($variables as $variable) {
167167

168168
// Is the variable required?
169-
if (! $data['env_' . $variable->env_variable]) {
169+
if (! isset($data['env_' . $variable->env_variable])) {
170170
if ($variable->required === 1) {
171171
throw new DisplayException('A required service option variable field (env_' . $variable->env_variable . ') was missing from the request.');
172172
}

0 commit comments

Comments
 (0)