Skip to content

Commit

Permalink
fix php8 warning
Browse files Browse the repository at this point in the history
  • Loading branch information
vvohh committed Dec 11, 2024
1 parent 7100a46 commit 734ba11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.

## [1.4.1] - 2024-12-11
- Fixed: php8 warning

## [1.4.0] - 2024-03-14
- Changed: require contao 4.13
- Changed: allow php 8
Expand Down
6 changes: 2 additions & 4 deletions models/NewsPlusModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ protected static function filterByCategories($arrColumns)
$t = static::$strTable;

// Use the default filter
if (is_array($GLOBALS['NEWS_FILTER_DEFAULT']) && !empty($GLOBALS['NEWS_FILTER_DEFAULT']))
{
if (isset($GLOBALS['NEWS_FILTER_DEFAULT']) && is_array($GLOBALS['NEWS_FILTER_DEFAULT']) && !empty($GLOBALS['NEWS_FILTER_DEFAULT'])) {
$arrCategories = static::getCategoriesCache();

if (!empty($arrCategories))
Expand Down Expand Up @@ -109,8 +108,7 @@ protected static function filterByCategories($arrColumns)
}

// Try to find by category
if ($GLOBALS['NEWS_FILTER_CATEGORIES'] && \Input::get('category'))
{
if (isset($GLOBALS['NEWS_FILTER_CATEGORIES']) && $GLOBALS['NEWS_FILTER_CATEGORIES'] && \Input::get('category')) {
$objCategory = NewsCategoryModel::findPublishedByIdOrAlias(\Input::get('category'));


Expand Down

0 comments on commit 734ba11

Please sign in to comment.