fix(files): allow any throwable in logException

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>
This commit is contained in:
Varun Patil 2023-12-02 20:52:45 -08:00 committed by backportbot-nextcloud[bot]
parent 9ab8020035
commit a7586ccf47

View 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);