mirror of
https://github.com/shlinkio/shlink.git
synced 2024-12-27 01:11:39 -06:00
Merge pull request #2076 from acelaya-forks/feature/fix-array-inputs
Make sure tags fallback to empty array when null
This commit is contained in:
commit
14702063f2
@ -68,7 +68,7 @@ final readonly class ShortUrlCreation implements TitleResolutionModelInterface
|
||||
ShortUrlInputFilter::SHORT_CODE_LENGTH,
|
||||
) ?? DEFAULT_SHORT_CODES_LENGTH,
|
||||
apiKey: $inputFilter->getValue(ShortUrlInputFilter::API_KEY),
|
||||
tags: $inputFilter->getValue(ShortUrlInputFilter::TAGS),
|
||||
tags: $inputFilter->getValue(ShortUrlInputFilter::TAGS) ?? [],
|
||||
title: $inputFilter->getValue(ShortUrlInputFilter::TITLE),
|
||||
crawlable: $inputFilter->getValue(ShortUrlInputFilter::CRAWLABLE),
|
||||
forwardQuery: getOptionalBoolFromInputFilter($inputFilter, ShortUrlInputFilter::FORWARD_QUERY) ?? true,
|
||||
|
@ -60,7 +60,7 @@ final readonly class ShortUrlEdition implements TitleResolutionModelInterface
|
||||
maxVisitsPropWasProvided: array_key_exists(ShortUrlInputFilter::MAX_VISITS, $data),
|
||||
maxVisits: getOptionalIntFromInputFilter($inputFilter, ShortUrlInputFilter::MAX_VISITS),
|
||||
tagsPropWasProvided: array_key_exists(ShortUrlInputFilter::TAGS, $data),
|
||||
tags: $inputFilter->getValue(ShortUrlInputFilter::TAGS),
|
||||
tags: $inputFilter->getValue(ShortUrlInputFilter::TAGS) ?? [],
|
||||
titlePropWasProvided: array_key_exists(ShortUrlInputFilter::TITLE, $data),
|
||||
title: $inputFilter->getValue(ShortUrlInputFilter::TITLE),
|
||||
crawlablePropWasProvided: array_key_exists(ShortUrlInputFilter::CRAWLABLE, $data),
|
||||
|
Loading…
Reference in New Issue
Block a user