Skip to content

Commit

Permalink
fix: br-srcset intval
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Meilick <[email protected]>
  • Loading branch information
bnomei committed Aug 21, 2019
1 parent 338b6c1 commit 88980c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion classes/Betterrest.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ private function optionsFromQuery(?array $query = null): array
}
if ($srcset = \Kirby\Toolkit\A::get($query, 'br-srcset')) {
$srcset = str_replace([' ', '%20'], ['', ''], (string) $srcset);
$optionsFromQuery['srcset'] = in_array($srcset, ['false', '0', 'null']) ? null : explode(',', $srcset);
$optionsFromQuery['srcset'] = in_array($srcset, ['false', '0', 'null']) ? null : array_map(static function($v) { return intval($v); }, explode(',', $srcset));
}

return $optionsFromQuery;
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "robinscholz/better-rest",
"description": "Kirby Plugin for better REST requests",
"type": "kirby-plugin",
"version": "1.2.4",
"version": "1.2.5",
"license": "MIT",
"authors": [
{
Expand Down

0 comments on commit 88980c2

Please sign in to comment.