Skip to content

Commit e2f36fe

Browse files
committed
fix: safely handle value for trailing comma case
1 parent 18af589 commit e2f36fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Http/Controllers/ImageTransformerController.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ protected static function parseOptions(string $options): array
165165

166166
return collect($options)
167167
->mapWithKeys(function ($option) {
168-
[$key, $value] = explode('=', $option);
168+
[$key] = explode('=', $option);
169+
170+
$value = explode('=', $option)[1] ?? null;
169171

170172
$value = is_numeric($value) ? (int) $value : $value;
171173

0 commit comments

Comments
 (0)