Commit 5cb2786
committed
fix(AmazonS3): handle missing LastModified and ETag in S3 responses
Add null-safety checks to handle S3 responses that don't include
LastModified and ETag fields. This prevents 'Undefined array key'
warnings and deprecation notices when processing directory metadata
or incomplete S3 responses.
- objectToMetaData(): Check if LastModified/ETag exist before accessing
- getMetaData(): Check if LastModified exists before using in strtotime()
Fixes test failures in testStat where hasUpdated('/', time) would fail
when encountering S3 objects without complete metadata.
Assisted-by: ClaudeCode:claude-sonnet-4-6
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>1 parent 715378f commit 5cb2786
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
347 | | - | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
348 | 350 | | |
349 | 351 | | |
350 | 352 | | |
| |||
673 | 675 | | |
674 | 676 | | |
675 | 677 | | |
| 678 | + | |
| 679 | + | |
676 | 680 | | |
677 | 681 | | |
678 | 682 | | |
679 | | - | |
680 | | - | |
681 | | - | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
682 | 686 | | |
683 | 687 | | |
684 | 688 | | |
| |||
0 commit comments