mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-17 12:23:46 +09:00
Updates to vendors etc
This commit is contained in:
@@ -24,20 +24,12 @@ class MissingMandatoryParametersException extends \InvalidArgumentException impl
|
||||
|
||||
/**
|
||||
* @param string[] $missingParameters
|
||||
* @param int $code
|
||||
*/
|
||||
public function __construct(string $routeName = '', $missingParameters = null, $code = 0, ?\Throwable $previous = null)
|
||||
public function __construct(string $routeName = '', array $missingParameters = [], int $code = 0, ?\Throwable $previous = null)
|
||||
{
|
||||
if (\is_array($missingParameters)) {
|
||||
$this->routeName = $routeName;
|
||||
$this->missingParameters = $missingParameters;
|
||||
$message = sprintf('Some mandatory parameters are missing ("%s") to generate a URL for route "%s".', implode('", "', $missingParameters), $routeName);
|
||||
} else {
|
||||
trigger_deprecation('symfony/routing', '6.1', 'Construction of "%s" with an exception message is deprecated, provide the route name and an array of missing parameters instead.', __CLASS__);
|
||||
$message = $routeName;
|
||||
$previous = $code instanceof \Throwable ? $code : null;
|
||||
$code = (int) $missingParameters;
|
||||
}
|
||||
$this->routeName = $routeName;
|
||||
$this->missingParameters = $missingParameters;
|
||||
$message = \sprintf('Some mandatory parameters are missing ("%s") to generate a URL for route "%s".', implode('", "', $missingParameters), $routeName);
|
||||
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user