mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-17 15:59:56 +03:00
Ensure string casting safety
This commit is contained in:
parent
2555424124
commit
cfc9a1b772
1 changed files with 2 additions and 1 deletions
|
@ -21,6 +21,7 @@ use function array_map;
|
|||
use function Functional\curry;
|
||||
use function Functional\flatten;
|
||||
use function Functional\unique;
|
||||
use function method_exists;
|
||||
use function sprintf;
|
||||
use function strpos;
|
||||
|
||||
|
@ -165,7 +166,7 @@ class GenerateShortUrlCommand extends Command
|
|||
|
||||
private function doValidateUrl(InputInterface $input): ?bool
|
||||
{
|
||||
$rawInput = (string) $input;
|
||||
$rawInput = method_exists($input, '__toString') ? $input->__toString() : '';
|
||||
|
||||
if (strpos($rawInput, '--no-validate-url') !== false) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue