diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 78ffda6407..01bfc271df 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -35,6 +35,7 @@ 'style' => 'post', ], 'indentation_type' => true, + 'is_null' => true, 'line_ending' => true, 'new_with_parentheses' => true, 'no_extra_blank_lines' => true, diff --git a/include/layout.inc b/include/layout.inc index 44fb31ddfa..356e009cc0 100644 --- a/include/layout.inc +++ b/include/layout.inc @@ -379,7 +379,7 @@ function print_news($news, $dog, $max = 5, $onlyyear = null, $return = false) { // Only print entries in the provided s/dog/cat/ egory // If $dog is null, everything matches foreach ($item["category"] as $category) { - if (is_null($dog) || in_array($category["term"], (array)$dog, true)) { + if (null === $dog || in_array($category["term"], (array)$dog, true)) { $ok = true; $count++; break;