1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 19:14:04 +00:00

fix regression in previous commit: consume PendingDispatch *before* reverting context

This commit is contained in:
Samuel Štancl 2025-02-19 12:28:38 +01:00
parent b9cc63feed
commit ffad2db103

View file

@ -83,6 +83,10 @@ class Tenancy
$this->initialize($tenant);
$result = $callback($tenant);
} finally {
if ($result instanceof PendingDispatch) { // #1277
$result = null;
}
if ($originalTenant) {
$this->initialize($originalTenant);
} else {
@ -90,10 +94,6 @@ class Tenancy
}
}
if ($result instanceof PendingDispatch) { // #1277
$result = null;
}
return $result;
}