diff options
| author | 2020-01-20 19:28:13 +0100 | |
|---|---|---|
| committer | 2020-01-20 19:28:13 +0100 | |
| commit | e537bcc3978cd56679b69a3eb75b8a39412d20cd (patch) | |
| tree | fee8f2669db3098169e82272c924237a70787e09 /app/Models/CategoryDAO.php | |
| parent | cd5ebcee05abf71e3e42da0abbb09a051385e60a (diff) | |
Fix null array index bug for PHP 7.4 (#2780)
Fix https://github.com/FreshRSS/FreshRSS/issues/2775
Especially for PHP 7.4+ "Array-style access of non-arrays"
https://php.net/migration74.incompatible
Diffstat (limited to 'app/Models/CategoryDAO.php')
| -rw-r--r-- | app/Models/CategoryDAO.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/Models/CategoryDAO.php b/app/Models/CategoryDAO.php index 4bba23d9c..519c7a29b 100644 --- a/app/Models/CategoryDAO.php +++ b/app/Models/CategoryDAO.php @@ -372,7 +372,7 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable $feedsDao = array(); $feedDao = FreshRSS_Factory::createFeedDAO(); foreach ($listDAO as $line) { - if ($previousLine['c_id'] != null && $line['c_id'] !== $previousLine['c_id']) { + if (!empty($previousLine['c_id']) && $line['c_id'] !== $previousLine['c_id']) { // End of the current category, we add it to the $list $cat = new FreshRSS_Category( $previousLine['c_name'], |
