]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(files): allow any throwable in logException 42014/head
authorVarun Patil <varunpatil@ucla.edu>
Sun, 3 Dec 2023 04:52:45 +0000 (20:52 -0800)
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>
Mon, 4 Dec 2023 16:26:37 +0000 (16:26 +0000)
If a TypeError is passed here, it in turn causes a TypeError which
kills the rendering of the error page.

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
apps/dav/lib/Files/BrowserErrorPagePlugin.php

index b3ce591bd4a8e3b686d1f58b5278b7f208355f20..eccae8afdd53335de3f4d81a0bb5e6a6cf9d2ce2 100644 (file)
@@ -70,9 +70,9 @@ class BrowserErrorPagePlugin extends ServerPlugin {
        }
 
        /**
-        * @param \Exception $ex
+        * @param \Throwable $ex
         */
-       public function logException(\Exception $ex) {
+       public function logException(\Throwable $ex): void {
                if ($ex instanceof Exception) {
                        $httpCode = $ex->getHTTPCode();
                        $headers = $ex->getHTTPHeaders($this->server);