mirror of
https://github.com/archtechx/tenancy.git
synced 2026-06-20 22:54:05 +00:00
cast numeric params to string params
This commit is contained in:
parent
88156d175d
commit
b3d11587ae
1 changed files with 4 additions and 0 deletions
|
|
@ -71,6 +71,10 @@ trait ValidatesDatabaseParameters
|
|||
continue;
|
||||
}
|
||||
|
||||
if (is_numeric($parameter)) {
|
||||
$parameter = (string) $parameter;
|
||||
}
|
||||
|
||||
if (! is_string($parameter)) {
|
||||
// E.g. if a parameter is retrieved from the config, it isn't necessarily a string
|
||||
throw new InvalidArgumentException('Parameter has to be a string.');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue