mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 14:54:03 +00:00
Fixed array to string conversion
Previous code would give this warning before actually showing exception message `<warning>PHP Warning: Array to string conversion in .../vendor/stancl/tenancy/src/CacheManager.php on line 24</warning>`
This commit is contained in:
parent
20e1fa1959
commit
d7d6007c7f
1 changed files with 4 additions and 2 deletions
|
|
@ -20,8 +20,10 @@ class CacheManager extends BaseCacheManager
|
||||||
$tags = [config('tenancy.cache.tag_base') . tenant()->getTenantKey()];
|
$tags = [config('tenancy.cache.tag_base') . tenant()->getTenantKey()];
|
||||||
|
|
||||||
if ($method === 'tags') {
|
if ($method === 'tags') {
|
||||||
if (count($parameters) !== 1) {
|
$parameter_count = count($parameters);
|
||||||
throw new \Exception("Method tags() takes exactly 1 argument. {count($parameters)} passed.");
|
|
||||||
|
if ($parameter_count !== 1) {
|
||||||
|
throw new \Exception("Method tags() takes exactly 1 argument. {$parameter_count} passed.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$names = $parameters[0];
|
$names = $parameters[0];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue