Permalink
Browse files

Change is_null() calls to strict checks

  • Loading branch information...
1 parent bb65765 commit 39b7023e756d8e7c84ca4de387a21271183d4695 @bcrowe bcrowe committed Oct 16, 2013
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/Cake/Model/Behavior/TreeBehavior.php
  2. +1 −1 lib/Cake/Network/CakeResponse.php
@@ -682,7 +682,7 @@ protected function _recoverByParentId(Model $Model, $counter = 1, $parentId = nu
$children = $Model->find('all', $params);
$hasChildren = (bool)$children;
- if (!is_null($parentId)) {
+ if ($parentId !== null) {
if ($hasChildren) {
$Model->updateAll(
array($this->settings[$Model->alias]['left'] => $counter),
@@ -713,7 +713,7 @@ protected function _recoverByParentId(Model $Model, $counter = 1, $parentId = nu
$children = $Model->find('all', $params);
}
- if (!is_null($parentId) && $hasChildren) {
+ if ($parentId !== null && $hasChildren) {
$Model->updateAll(
array($this->settings[$Model->alias]['right'] => $counter),
array($Model->escapeField() => $parentId)
@@ -570,7 +570,7 @@ public function header($header = null, $value = null) {
if (is_numeric($header)) {
list($header, $value) = array($value, null);
}
- if (is_null($value)) {
+ if ($value === null) {
list($header, $value) = explode(':', $header, 2);
}
$this->_headers[$header] = is_array($value) ? array_map('trim', $value) : trim($value);

0 comments on commit 39b7023

Please sign in to comment.