mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Change is_null() calls to strict checks
This commit is contained in:
parent
bb65765d70
commit
39b7023e75
2 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue