Uh oh!
There was an error while loading. Please reload this page.
[stable30] fix(files_external): Safely check if the timestamp is numeric - #52768
Closed
backportbot[bot] wants to merge 1 commit into
Closed
[stable30] fix(files_external): Safely check if the timestamp is numeric#52768backportbot[bot] wants to merge 1 commit into
backportbot[bot] wants to merge 1 commit into
Conversation
solracsfforce-pushed
the
backport/52686/stable30
branch
from
May 12, 2025 12:39
f6ef832 to
95f8c33Comparesolracsf
marked this pull request as ready for review
May 12, 2025 12:39
| if (isset($objectMetadata['timestamp'])) { | ||
| $mtime = $objectMetadata['timestamp']; | ||
| $mtime = null; | ||
| if (!empty($object->lastModified)) { |
Check notice
Code scanning / Psalm
RedundantConditionGivenDocblockType
| if (isset($objectMetadata['timestamp'])) { | ||
| $mtime = $objectMetadata['timestamp']; | ||
| $mtime = null; | ||
| if (!empty($object->lastModified)) { |
Check notice
Code scanning / Psalm
PossiblyInvalidPropertyFetch
| $mtime = $objectMetadata['timestamp']; | ||
| $mtime = null; | ||
| if (!empty($object->lastModified)) { | ||
| $dateTime = \DateTime::createFromFormat(\DateTime::RFC1123, $object->lastModified); |
Check notice
Code scanning / Psalm
InvalidArgument
| if (!empty($mtime)) { | ||
| $mtime = floor($mtime); | ||
| if (is_numeric($object->getMetadata()['timestamp'] ?? null)) { |
Check notice
Code scanning / Psalm
PossiblyInvalidMethodCall
| if (!empty($mtime)) { | ||
| $mtime = floor($mtime); | ||
| if (is_numeric($object->getMetadata()['timestamp'] ?? null)) { | ||
| $mtime = (float)$object->getMetadata()['timestamp']; |
Check notice
Code scanning / Psalm
PossiblyInvalidMethodCall
| $stat['atime'] = time(); | ||
| return $stat; | ||
| return [ | ||
| 'size' => (int)$object->contentLength, |
Check notice
Code scanning / Psalm
PossiblyInvalidPropertyFetch
artonge
approved these changes
May 12, 2025
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
solracsfforce-pushed
the
backport/52686/stable30
branch
from
May 12, 2025 16:38
95f8c33 to
e091311Compare| } | ||
| public function stat($path) { | ||
| public function stat(string $path): array|false { |
Check failure
Code scanning / Psalm
MethodSignatureMismatch
| } | ||
| public function stat($path) { | ||
| public function stat(string $path): array|false { |
Check failure
Code scanning / Psalm
MethodSignatureMismatch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #52686
Todo
Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.