mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 10:14:04 +00:00
Don't allow callables for queue chain
This commit is contained in:
parent
96679240de
commit
bdab188a61
1 changed files with 1 additions and 3 deletions
|
|
@ -162,9 +162,7 @@ class DatabaseManager
|
|||
if ($this->app['config']['tenancy.queue_database_creation'] ?? false) {
|
||||
$chain = [];
|
||||
foreach ($afterCreating as $item) {
|
||||
if (is_callable($item)) {
|
||||
$chain[] = $item($tenant); // Callables are called and given $tenant
|
||||
} elseif (is_string($item) && class_exists($item)) {
|
||||
if (is_string($item) && class_exists($item)) {
|
||||
$chain[] = new $item($tenant); // Classes are instantiated and given $tenant
|
||||
} elseif ($item instanceof ShouldQueue) {
|
||||
$chain[] = $item;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue