Skip to content

Commit 1b0a625

Browse files
committed
Fix undefined index error; closes pterodactyl#2378; closes pterodactyl#2391
1 parent d4363cb commit 1b0a625

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/Exceptions/Handler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public function invalidJson($request, ValidationException $exception)
190190

191191
$converted = self::convertToArray($exception)['errors'][0];
192192
$converted['detail'] = $error;
193-
$converted['meta'] = is_array($converted['meta']) ? array_merge($converted['meta'], $meta) : $meta;
193+
$converted['meta'] = is_array($converted['meta'] ?? null) ? array_merge($converted['meta'], $meta) : $meta;
194194

195195
$response[] = $converted;
196196
}

0 commit comments

Comments
 (0)