Skip to content

Commit

Permalink
Fix not converted parameter in route::_ and log warning
Browse files Browse the repository at this point in the history
  • Loading branch information
HLeithner committed Jun 16, 2019
1 parent 2c5607e commit f1b03bb
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions libraries/src/Router/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,16 @@ public static function _($url, $xhtml = true, $tls = self::TLS_IGNORE, $absolute
$tls = self::TLS_DISABLE;
}

// @deprecated 4.0 Before 3.9.7 this method silently converted boolean to integer
if (is_bool($tls))
// @deprecated 4.0 Before 3.9.7 this method silently converted $tls to integer
if (!is_int($tls))
{
Log::add(
__METHOD__ . '() called with incompatible variable type boolean on parameter $tls.',
Log::WARNING,
'deprecated'
);

if ($tls === true)
{
$tls = self::TLS_FORCE;
}
else
{
$tls = self::TLS_IGNORE;
}
$tls = (int) $tls;
}

$app = Factory::getApplication();
Expand Down

0 comments on commit f1b03bb

Please sign in to comment.