mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 05:24:03 +00:00
fix regression in previous commit: consume PendingDispatch *before* reverting context
This commit is contained in:
parent
b9cc63feed
commit
ffad2db103
1 changed files with 4 additions and 4 deletions
|
|
@ -83,6 +83,10 @@ class Tenancy
|
||||||
$this->initialize($tenant);
|
$this->initialize($tenant);
|
||||||
$result = $callback($tenant);
|
$result = $callback($tenant);
|
||||||
} finally {
|
} finally {
|
||||||
|
if ($result instanceof PendingDispatch) { // #1277
|
||||||
|
$result = null;
|
||||||
|
}
|
||||||
|
|
||||||
if ($originalTenant) {
|
if ($originalTenant) {
|
||||||
$this->initialize($originalTenant);
|
$this->initialize($originalTenant);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -90,10 +94,6 @@ class Tenancy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($result instanceof PendingDispatch) { // #1277
|
|
||||||
$result = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue