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
171
171
{
172
172
switch ($ shape ->getType ()) {
173
173
case 'integer ' :
174
+ case 'long ' :
174
175
return 'FILTER_VALIDATE_INT ' ;
175
176
case 'boolean ' :
176
177
return 'FILTER_VALIDATE_BOOLEAN ' ;
Original file line number Diff line number Diff line change @@ -506,7 +506,7 @@ protected function populateResult(Response $response): void
506
506
$ this ->expiration = $ headers ['x-amz-expiration ' ][0 ] ?? null ;
507
507
$ this ->restore = $ headers ['x-amz-restore ' ][0 ] ?? null ;
508
508
$ 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 ;
510
510
$ this ->etag = $ headers ['etag ' ][0 ] ?? null ;
511
511
$ this ->checksumCrc32 = $ headers ['x-amz-checksum-crc32 ' ][0 ] ?? null ;
512
512
$ 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
534
534
$ this ->restore = $ headers ['x-amz-restore ' ][0 ] ?? null ;
535
535
$ this ->archiveStatus = $ headers ['x-amz-archive-status ' ][0 ] ?? null ;
536
536
$ 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 ;
538
538
$ this ->checksumCrc32 = $ headers ['x-amz-checksum-crc32 ' ][0 ] ?? null ;
539
539
$ this ->checksumCrc32C = $ headers ['x-amz-checksum-crc32c ' ][0 ] ?? null ;
540
540
$ this ->checksumSha1 = $ headers ['x-amz-checksum-sha1 ' ][0 ] ?? null ;
You can’t perform that action at this time.
0 commit comments