File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed
CodeGenerator/src/Generator/CodeGenerator Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ public function getFilterConstant(Shape $shape): ?string
171171 {
172172 switch ($ shape ->getType ()) {
173173 case 'integer ' :
174+ case 'long ' :
174175 return 'FILTER_VALIDATE_INT ' ;
175176 case 'boolean ' :
176177 return 'FILTER_VALIDATE_BOOLEAN ' ;
Original file line number Diff line number Diff line change @@ -506,7 +506,7 @@ protected function populateResult(Response $response): void
506506 $ this ->expiration = $ headers ['x-amz-expiration ' ][0 ] ?? null ;
507507 $ this ->restore = $ headers ['x-amz-restore ' ][0 ] ?? null ;
508508 $ this ->lastModified = isset ($ headers ['last-modified ' ][0 ]) ? new \DateTimeImmutable ($ headers ['last-modified ' ][0 ]) : null ;
509- $ this ->contentLength = $ headers ['content-length ' ][0 ] ?? null ;
509+ $ this ->contentLength = isset ( $ headers ['content-length ' ][0 ]) ? filter_var ( $ headers [ ' content-length ' ][ 0 ], \ FILTER_VALIDATE_INT ) : null ;
510510 $ this ->etag = $ headers ['etag ' ][0 ] ?? null ;
511511 $ this ->checksumCrc32 = $ headers ['x-amz-checksum-crc32 ' ][0 ] ?? null ;
512512 $ this ->checksumCrc32C = $ headers ['x-amz-checksum-crc32c ' ][0 ] ?? null ;
Original file line number Diff line number Diff line change @@ -534,7 +534,7 @@ protected function populateResult(Response $response): void
534534 $ this ->restore = $ headers ['x-amz-restore ' ][0 ] ?? null ;
535535 $ this ->archiveStatus = $ headers ['x-amz-archive-status ' ][0 ] ?? null ;
536536 $ this ->lastModified = isset ($ headers ['last-modified ' ][0 ]) ? new \DateTimeImmutable ($ headers ['last-modified ' ][0 ]) : null ;
537- $ this ->contentLength = $ headers ['content-length ' ][0 ] ?? null ;
537+ $ this ->contentLength = isset ( $ headers ['content-length ' ][0 ]) ? filter_var ( $ headers [ ' content-length ' ][ 0 ], \ FILTER_VALIDATE_INT ) : null ;
538538 $ this ->checksumCrc32 = $ headers ['x-amz-checksum-crc32 ' ][0 ] ?? null ;
539539 $ this ->checksumCrc32C = $ headers ['x-amz-checksum-crc32c ' ][0 ] ?? null ;
540540 $ this ->checksumSha1 = $ headers ['x-amz-checksum-sha1 ' ][0 ] ?? null ;
You can’t perform that action at this time.
0 commit comments