Change is_null() calls to strict checks

This commit is contained in:
Bryan Crowe 2013-10-15 22:32:46 -04:00
parent bb65765d70
commit 39b7023e75
2 changed files with 3 additions and 3 deletions

View file

@ -682,7 +682,7 @@ class TreeBehavior extends ModelBehavior {
$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 @@ class TreeBehavior extends ModelBehavior {
$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)

View file

@ -570,7 +570,7 @@ class CakeResponse {
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);