diff --git a/lib/Horde/Core/Factory/ActiveSyncBackend.php b/lib/Horde/Core/Factory/ActiveSyncBackend.php index 5175179a..dc01833b 100644 --- a/lib/Horde/Core/Factory/ActiveSyncBackend.php +++ b/lib/Horde/Core/Factory/ActiveSyncBackend.php @@ -1,6 +1,7 @@ get(ServerRequest::class); - } catch (Horde_Exception_NotFound $e) { + } catch (Horde_Exception_NotFound | InjectorNotFoundException $e) { + // Injector throws Horde\Injector\NotFoundException when ServerRequest is + // unbound; legacy code threw Horde_Exception_NotFound. Both must use the + // superglobal fallback (PHP 7.4: no union catch). + if (!$e instanceof Horde_Exception_NotFound && !$e instanceof InjectorNotFoundException) { + throw $e; + } // Fallback: Create from PHP superglobals $serverRequest = new ServerRequest( $_SERVER['REQUEST_METHOD'] ?? 'GET',