View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0033634 | mantisbt | rss | public | 2024-02-12 10:48 | 2024-02-20 16:58 |
Reporter | tm8544 | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | PHP 8.3.2 | OS | Windows | OS Version | 11 |
Target Version | 2.26.1 | Fixed in Version | 2.26.1 | ||
Summary | 0033634: Error in creating RSS when there are no issues to publish | ||||
Description | count(): Argument 0000001 ($value) must be of type Countable|array, null given | ||||
Steps To Reproduce | Install bugtracker, create some projects but do not create issues. Try to create rss. | ||||
Additional Information | Changelog for count() On bugtracker\library\rssbuilder\class.ObjectIterator.inc.php, modify function size() as follows public function size() { | ||||
Tags | patch, PHP 8 | ||||
related to | 0024145 | new | Replace rssbuilder with a well maintained library via composer |
The RSS library we use is very outdated and unmaintained. Replacing it is tracked here 0024145. I actually started working on that several years ago, but it's not a priority for me and I never finished the work (see https://github.com/dregad/mantisbt/tree/rssbuilder-replace). If you or anyone else wishes to pick up on that feature branch, be my guest. Until then, we have already patched it in the past so it should be no issue to fix this PHP-compatibility issue too, I'll have a closer look as time allows. Would you mind submitting your proposed fix as a Pull request ? |
|
MantisBT: master-2.26 0e241f33 2024-02-13 03:44 Committer: dregad Details Diff |
Fix Error when creating empty RSS feed on PHP 8 When the feed is empty, ObjectIterator::size() throws a TypeError exception on PHP 8.0+ (and a Warning on PHP 7.2+) due to calling count() on $this->objectlist->objects, which is null in this case. Fixes 0033634 Signed-off-by: Damien Regad <dregad@mantisbt.org> - Rewrote original commit message - Fixed whitespace - Updated library\README.md - Removed closing `?>` tag |
Affected Issues 0033634 |
|
mod - library/README.md | Diff File | ||
mod - library/rssbuilder/class.ObjectIterator.inc.php | Diff File | ||
MantisBT: master-2.26 9a8f1277 2024-02-13 10:39 Details Diff |
Fix Error when creating empty RSS feed on PHP 8 When the feed is empty, ObjectIterator::size() throws a TypeError exception on PHP 8.0+ (and a Warning on PHP 7.2+) due to calling count() on $this->objectlist->objects, which is null in this case. Initializing the ObjectList::$objects property to an empty array ensures this never happens. File was converted to UTF-8 and trailing ?> removed. Fixes 0033634 |
Affected Issues 0033634 |
|
mod - library/README.md | Diff File | ||
mod - library/rssbuilder/class.ObjectList.inc.php | Diff File | ||
MantisBT: master-2.26 7dcb81cd 2024-02-13 10:45 Details Diff |
Revert "Fix Error when creating empty RSS feed on PHP 8" This reverts commit 0e241f33687ce4af5ef483b7f3cbd2ffd8817838. |
Affected Issues 0033634 |
|
mod - library/README.md | Diff File | ||
mod - library/rssbuilder/class.ObjectIterator.inc.php | Diff File |