mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 08:14:02 +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) {
|
if ($this->app['config']['tenancy.queue_database_creation'] ?? false) {
|
||||||
$chain = [];
|
$chain = [];
|
||||||
foreach ($afterCreating as $item) {
|
foreach ($afterCreating as $item) {
|
||||||
if (is_callable($item)) {
|
if (is_string($item) && class_exists($item)) {
|
||||||
$chain[] = $item($tenant); // Callables are called and given $tenant
|
|
||||||
} elseif (is_string($item) && class_exists($item)) {
|
|
||||||
$chain[] = new $item($tenant); // Classes are instantiated and given $tenant
|
$chain[] = new $item($tenant); // Classes are instantiated and given $tenant
|
||||||
} elseif ($item instanceof ShouldQueue) {
|
} elseif ($item instanceof ShouldQueue) {
|
||||||
$chain[] = $item;
|
$chain[] = $item;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue