1
0
Fork 0
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:
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); $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;
} }