Skip to content

Commit 2b81932

Browse files
committed
Cast quality option to int to fix TypeError from URL params, fixes #231
1 parent ee9caac commit 2b81932

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Image.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ public function __construct(string $path, array $options = [])
3333
$this->interlace = $options['interlace'];
3434
$this->upsize = $options['upsize'];
3535
if (isset($options['quality']) && is_array($options['quality'])) {
36-
$this->quality = reset($options['quality']);
36+
$this->quality = (int) reset($options['quality']);
3737
} else {
38-
$this->quality = $options['quality'];
38+
$this->quality = (int) $options['quality'];
3939
}
4040

4141
$this->format = $options['format'] ?? $this->getFormatFromPath($path);

0 commit comments

Comments
 (0)