Use strict boolean compare

This commit is contained in:
Andy Miller
2016-02-05 12:26:29 -07:00
parent de9b6df2c7
commit 63812cc6b1
4 changed files with 5 additions and 5 deletions

View File

@@ -283,7 +283,7 @@ class Validation
protected static function filterFile($value, array $params, array $field)
{
if (isset($field['multiple']) && $field['multiple'] == true) {
if (isset($field['multiple']) && $field['multiple'] === true) {
return (array) $value;
}

View File

@@ -318,7 +318,7 @@ class Grav extends Container
$code = $matches[2];
}
if ($code == null) {
if ($code === null) {
$code = $this['config']->get('system.pages.redirect_default_code', 301);
}

View File

@@ -528,7 +528,7 @@ class Page
// if no cached-content run everything
if ($this->content === false || $cache_enable == false) {
if ($this->content === false || $cache_enable === false) {
$this->content = $this->raw_content;
self::getGrav()->fireEvent('onPageContentRaw', new Event(['page' => $this]));
@@ -1881,7 +1881,7 @@ class Page
while (true) {
$theParent = $topParent->parent();
if ($theParent != null && $theParent->parent() !== null) {
if ($theParent !== null && $theParent->parent() !== null) {
$topParent = $theParent;
} else {
break;

View File

@@ -258,7 +258,7 @@ class Uri
$language = $grav['language'];
// add the port to the base for non-standard ports
if ($config->get('system.reverse_proxy_setup') == false && $this->port != '80' && $this->port != '443') {
if ($config->get('system.reverse_proxy_setup') === false && $this->port != '80' && $this->port != '443') {
$this->base .= ":" . $this->port;
}