File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ public function setField(string $name, string $value)
5151
5252 public function getField (string $ name ): string
5353 {
54- return $ this ->_fields [$ name ];
54+ return array_key_exists ( $ name , $ this ->_fields ) ? $ this -> _fields [$ name ] : "" ;
5555 }
5656
5757 public function toArray (): array
Original file line number Diff line number Diff line change @@ -138,12 +138,12 @@ public function getConnection(): string
138138
139139 public function setContentLength (int $ value )
140140 {
141- $ this ->setField ("Content-Length " , $ value );
141+ $ this ->setField ("Content-Length " , strval ( $ value) );
142142 }
143143
144144 public function getContentLength (): int
145145 {
146- return $ this ->getField ("Content-Length " );
146+ return intval ( $ this ->getField ("Content-Length " ) );
147147 }
148148
149149 public function setContentType (string $ value )
@@ -258,12 +258,12 @@ public function getIfUnmodifiedSince(): string
258258
259259 public function setMaxForward (int $ value )
260260 {
261- $ this ->setField ("Max-Forward " , $ value );
261+ $ this ->setField ("Max-Forward " , strval ( $ value) );
262262 }
263263
264264 public function getMaxForward (): int
265265 {
266- return $ this ->getField ("Max-Forward " );
266+ return intval ( $ this ->getField ("Max-Forward " ) );
267267 }
268268
269269 public function setOrigin (string $ value )
Original file line number Diff line number Diff line change @@ -68,12 +68,12 @@ public function getAcceptRanges(): string
6868
6969 public function setAge (int $ value )
7070 {
71- $ this ->setField ("Age " , $ value );
71+ $ this ->setField ("Age " , strval ( $ value) );
7272 }
7373
7474 public function getAge (): int
7575 {
76- return $ this ->getField ("Age " );
76+ return intval ( $ this ->getField ("Age " ) );
7777 }
7878
7979 public function setAllow (string $ value )
@@ -148,12 +148,12 @@ public function getContentLanguage(): string
148148
149149 public function setContentLength (int $ value )
150150 {
151- $ this ->setField ("Content-Length " , $ value );
151+ $ this ->setField ("Content-Length " , strval ( $ value) );
152152 }
153153
154154 public function getContentLength (): int
155155 {
156- return $ this ->getField ("Content-Length " );
156+ return intval ( $ this ->getField ("Content-Length " ) );
157157 }
158158
159159 public function setContentLocation (string $ value )
You can’t perform that action at this time.
0 commit comments