Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Sep 5, 2024

Backport of #47770

Warning, This backport's changes differ from the original and might be incomplete ⚠️

Todo

  • Review and resolve any conflicts
  • Amend HEAD commit to remove the line stating to skip CI

Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot backportbot bot added bug 3. to review Waiting for reviews feature: dav php Pull requests that update Php code labels Sep 5, 2024
@backportbot backportbot bot added this to the Nextcloud 28.0.10 milestone Sep 5, 2024
@artonge artonge force-pushed the backport/47770/stable28 branch from 26df2fe to d25d8cc Compare September 5, 2024 18:35
} 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
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 marked this pull request as ready for review September 5, 2024 20:44
@artonge artonge enabled auto-merge September 5, 2024 20:44
Copy link
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If possible please directly include the fix for invalid PHP short tags, otherwise OCS / WebDAV errors are broken:
#47805

Otherwise dismiss this if you prefer to handle separate PRs

artonge and others added 2 commits September 9, 2024 17:30
The `<?xml` tag is interpreted as PHP short tags, so this causes errors.
Instead just print that part of the template.

Signed-off-by: Ferdinand Thiessen <[email protected]>
@artonge artonge force-pushed the backport/47770/stable28 branch from 785582a to 414a66e Compare September 9, 2024 15:30
@sorbaugh sorbaugh disabled auto-merge September 10, 2024 08:56
@sorbaugh sorbaugh merged commit 3c2ead7 into stable28 Sep 10, 2024
@sorbaugh sorbaugh deleted the backport/47770/stable28 branch September 10, 2024 08:56
@Altahrim Altahrim mentioned this pull request Sep 11, 2024
8 tasks
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.

6 participants