mirror of
https://github.com/shlinkio/shlink.git
synced 2024-12-27 17:31:20 -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,
|
ShortUrlInputFilter::SHORT_CODE_LENGTH,
|
||||||
) ?? DEFAULT_SHORT_CODES_LENGTH,
|
) ?? DEFAULT_SHORT_CODES_LENGTH,
|
||||||
apiKey: $inputFilter->getValue(ShortUrlInputFilter::API_KEY),
|
apiKey: $inputFilter->getValue(ShortUrlInputFilter::API_KEY),
|
||||||
tags: $inputFilter->getValue(ShortUrlInputFilter::TAGS),
|
tags: $inputFilter->getValue(ShortUrlInputFilter::TAGS) ?? [],
|
||||||
title: $inputFilter->getValue(ShortUrlInputFilter::TITLE),
|
title: $inputFilter->getValue(ShortUrlInputFilter::TITLE),
|
||||||
crawlable: $inputFilter->getValue(ShortUrlInputFilter::CRAWLABLE),
|
crawlable: $inputFilter->getValue(ShortUrlInputFilter::CRAWLABLE),
|
||||||
forwardQuery: getOptionalBoolFromInputFilter($inputFilter, ShortUrlInputFilter::FORWARD_QUERY) ?? true,
|
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),
|
maxVisitsPropWasProvided: array_key_exists(ShortUrlInputFilter::MAX_VISITS, $data),
|
||||||
maxVisits: getOptionalIntFromInputFilter($inputFilter, ShortUrlInputFilter::MAX_VISITS),
|
maxVisits: getOptionalIntFromInputFilter($inputFilter, ShortUrlInputFilter::MAX_VISITS),
|
||||||
tagsPropWasProvided: array_key_exists(ShortUrlInputFilter::TAGS, $data),
|
tagsPropWasProvided: array_key_exists(ShortUrlInputFilter::TAGS, $data),
|
||||||
tags: $inputFilter->getValue(ShortUrlInputFilter::TAGS),
|
tags: $inputFilter->getValue(ShortUrlInputFilter::TAGS) ?? [],
|
||||||
titlePropWasProvided: array_key_exists(ShortUrlInputFilter::TITLE, $data),
|
titlePropWasProvided: array_key_exists(ShortUrlInputFilter::TITLE, $data),
|
||||||
title: $inputFilter->getValue(ShortUrlInputFilter::TITLE),
|
title: $inputFilter->getValue(ShortUrlInputFilter::TITLE),
|
||||||
crawlablePropWasProvided: array_key_exists(ShortUrlInputFilter::CRAWLABLE, $data),
|
crawlablePropWasProvided: array_key_exists(ShortUrlInputFilter::CRAWLABLE, $data),
|
||||||
|
Loading…
Reference in New Issue
Block a user