Skip to content

Commit 222489e

Browse files
authored
Merge pull request #2253 from pjsde/fix_parameters
Fix invalid parameters
2 parents d7e8f04 + 139bb9b commit 222489e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

system/HTTP/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ public function getIPAddress(): string
234234
*/
235235
public function isValidIP(string $ip = null, string $which = null): bool
236236
{
237-
switch (strtolower($which))
237+
switch (strtolower( (string) $which))
238238
{
239239
case 'ipv4':
240240
$which = FILTER_FLAG_IPV4;

system/HTTP/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ public function sendHeaders()
714714
// http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html
715715
if (! isset($this->headers['Date']))
716716
{
717-
$this->setDate(\DateTime::createFromFormat('U', time()));
717+
$this->setDate(\DateTime::createFromFormat('U', (string) time()));
718718
}
719719

720720
// HTTP Status

0 commit comments

Comments
 (0)