Skip to content

Conversation

@artonge
Copy link
Contributor

@artonge artonge commented Sep 5, 2024

In order to match what we are doing with regular controlers.

@artonge artonge added bug 3. to review Waiting for reviews feature: dav php Pull requests that update Php code labels Sep 5, 2024
@artonge artonge added this to the Nextcloud 31 milestone Sep 5, 2024
@artonge artonge self-assigned this Sep 5, 2024
@artonge artonge requested a review from come-nc September 5, 2024 11:42
} else {
$templateName = 'xml_exception';
$renderAs = null;
$this->server->httpResponse->setHeader('Content-Type', 'application/xml; charset=utf-8');

Check notice

Code scanning / Psalm

PossiblyNullPropertyFetch

Cannot get property on possibly null variable $this->server of type Sabre\DAV\Server|null
} else {
$templateName = 'xml_exception';
$renderAs = null;
$this->server->httpResponse->setHeader('Content-Type', 'application/xml; charset=utf-8');

Check notice

Code scanning / Psalm

PossiblyNullReference

Cannot call method setHeader on possibly null value
$content = new OC_Template('core', $templateName, 'guest');
$debug = $this->config->getSystemValueBool('debug', false);

$content = new OC_Template('core', $templateName, $renderAs);

Check notice

Code scanning / Psalm

PossiblyNullArgument

Argument 3 of OC_Template::__construct cannot be null, possibly null value provided
@artonge artonge force-pushed the artonge/fix/always_respond_custom_error_page_on_exceptions branch from 1624a63 to 330d1b3 Compare September 5, 2024 12:15
if (BrowserErrorPagePlugin::isBrowserRequest($request)) {
$this->server->addPlugin(new BrowserErrorPagePlugin());
}
$this->server->addPlugin(new ErrorPagePlugin($this->request, \OC::$server->getConfig()));

Check notice

Code scanning / Psalm

DeprecatedMethod

The method OC\Server::getConfig has been marked as deprecated
@artonge artonge force-pushed the artonge/fix/always_respond_custom_error_page_on_exceptions branch 6 times, most recently from 008d0ff to fc0ea7a Compare September 5, 2024 13:58
@artonge artonge force-pushed the artonge/fix/always_respond_custom_error_page_on_exceptions branch from fc0ea7a to 9992e7d Compare September 5, 2024 14:17
@artonge
Copy link
Contributor Author

artonge commented Sep 5, 2024

/backport to stable30

@artonge
Copy link
Contributor Author

artonge commented Sep 5, 2024

/backport to stable29

@artonge
Copy link
Contributor Author

artonge commented Sep 5, 2024

/backport to stable28

@artonge artonge enabled auto-merge September 5, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews bug feature: dav php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants