]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(files): allow any throwable in logException 41985/head
authorVarun Patil <varunpatil@ucla.edu>
Sun, 3 Dec 2023 04:52:45 +0000 (20:52 -0800)
committerArthur Schiwon <blizzz@arthur-schiwon.de>
Mon, 4 Dec 2023 09:46:51 +0000 (10:46 +0100)
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);