mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 18:44:03 +00:00
Fixed array to string conversion (#718)
* 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>` * Update variable & syntax Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
This commit is contained in:
parent
08bfd6f9bb
commit
435d8528a7
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) {
|
$count = count($parameters);
|
||||||
throw new \Exception("Method tags() takes exactly 1 argument. {count($parameters)} passed.");
|
|
||||||
|
if ($count !== 1) {
|
||||||
|
throw new \Exception("Method tags() takes exactly 1 argument. $count passed.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$names = $parameters[0];
|
$names = $parameters[0];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue