1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-06-20 22:04:02 +00:00

cast numeric params to string params

This commit is contained in:
Samuel Stancl 2026-06-08 15:24:04 -07:00
parent 88156d175d
commit b3d11587ae
No known key found for this signature in database
GPG key ID: BA146259A1E16C57

View file

@ -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.');