Skip to content

Commit

Permalink
fix(files): allow any throwable in logException
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pulsejet committed Dec 3, 2023
1 parent 4aa8433 commit 9c4f7ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/dav/lib/Files/BrowserErrorPagePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ public static function isBrowserRequest(IRequest $request) {
}

/**
* @param \Exception $ex
* @param \Throwable $ex
*/
public function logException(\Exception $ex) {
public function logException(\Throwable $ex) {

Check notice

Code scanning / Psalm

MissingReturnType Note

Method OCA\DAV\Files\BrowserErrorPagePlugin::logException does not have a return type, expecting void
if ($ex instanceof Exception) {
$httpCode = $ex->getHTTPCode();
$headers = $ex->getHTTPHeaders($this->server);
Expand Down

0 comments on commit 9c4f7ac

Please sign in to comment.