Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes the undefined index error with the DAV property getlastmodified #31632

Merged
merged 4 commits into from
Mar 29, 2022

Conversation

Maaxxs
Copy link
Contributor

@Maaxxs Maaxxs commented Mar 19, 2022

This PR fixes the undefined index {DAV:}getlastmodified error, which can occur in the DAV.php file.

The return value in the else clause is false if neither getetag nor getlastmodified is set. At least, I would argue that it should return false because false is returned if there is no response ($response === false), and in the exceptions, too.

It resolves some errors from issue #15363.

@tcitworld
Copy link
Member

There was 1 failure:
1) OCA\Files_External\Tests\Storage\WebdavTest::testStat
Failed asserting that 0 is equal to 1647733789 or is greater than 1647733789. 
/drone/src/tests/lib/Files/Storage/Storage.php:318 

@tcitworld tcitworld added bug 3. to review Waiting for reviews feature: external storage feature: dav php Pull requests that update Php code labels Mar 20, 2022
@tcitworld tcitworld linked an issue Mar 20, 2022 that may be closed by this pull request
@tcitworld tcitworld added this to the Nextcloud 24 milestone Mar 20, 2022
Signed-off-by: Max Kunzelmann <[email protected]>
@Maaxxs
Copy link
Contributor Author

Maaxxs commented Mar 20, 2022

Somehow I missed that typo yesterday night. Now it should get the proper modified time.

@miaulalala miaulalala requested review from a team, nickvergessen, ArtificialOwl and icewind1991 and removed request for a team March 21, 2022 11:20
@nickvergessen nickvergessen removed their request for review March 22, 2022 11:03
lib/private/Files/Storage/DAV.php Outdated Show resolved Hide resolved
@skjnldsv skjnldsv mentioned this pull request Mar 24, 2022
@artonge artonge merged commit 7d2cb35 into nextcloud:master Mar 29, 2022
@welcome
Copy link

welcome bot commented Mar 29, 2022

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

@artonge
Copy link
Contributor

artonge commented Mar 29, 2022

Thanks for the fix @Maaxxs !

@Maaxxs Maaxxs deleted the fix-undefined-index-dav branch March 29, 2022 13:55
@blizzz blizzz mentioned this pull request Mar 31, 2022
@solracsf
Copy link
Member

solracsf commented Apr 1, 2022

Should this be backported?

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 feature: external storage php Pull requests that update Php code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WebDAV Undefined index: {DAV:}getlastmodified
6 participants