Skip to content

Commit

Permalink
Merge pull request #2253 from pjsde/fix_parameters
Browse files Browse the repository at this point in the history
Fix invalid parameters
  • Loading branch information
jim-parry authored Sep 23, 2019
2 parents d7e8f04 + 139bb9b commit 222489e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion system/HTTP/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public function getIPAddress(): string
*/
public function isValidIP(string $ip = null, string $which = null): bool
{
switch (strtolower($which))
switch (strtolower( (string) $which))
{
case 'ipv4':
$which = FILTER_FLAG_IPV4;
Expand Down
2 changes: 1 addition & 1 deletion system/HTTP/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ public function sendHeaders()
// http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html
if (! isset($this->headers['Date']))
{
$this->setDate(\DateTime::createFromFormat('U', time()));
$this->setDate(\DateTime::createFromFormat('U', (string) time()));
}

// HTTP Status
Expand Down

0 comments on commit 222489e

Please sign in to comment.