Page 1 of 1

RSS Feeds broken under PHP 7.2.13-1

Posted: 12 Jan 2019, 15:53
by SteveAtty
Just wondering if anyone else has had this problem.

I've got PHP 5.6 and 7.2 running as fpm for my web server.

Under 5.6 everything works fine
Under 7.2 everything works fine apart from the RSS feed which falls over with an Apache 400 error.

I'm running 2.18.0 but the problem also occurs on the 1.3 branch.

Commenting things out I get down to this call in issues_rss.php :

Code: Select all

$t_rssfile->addRSSItem
in class.RSSBuilder.inc.php there is this code:

Code: Select all

	public function addRSSItem($about = '',
							   $title = '',
							   $link = '',
							   $description = '',
							   $subject = '',
							   $date = 0,
							   $author = '',
							   $comments = '',
							   $image = '') {
		$this->rss_itemlist->addRSSItem(new RSSItem($about, $title, $link,
										$description, $subject, $date, $author,
										$comments, $image));
which seems to be where the problem lies.

There are no logs anywhere.

I've checked my PHP configurations and there seems to be no obvious difference.

Anyone got any ideas?

Re: RSS Feeds broken under PHP 7.2.13-1

Posted: 12 Jan 2019, 17:03
by atrol
Please try if changing the function as below fixes the issue

Code: Select all

public function addRSSItem($about = '',
							   $title = '',
							   $link = '',
							   $description = '',
							   $subject = '',
							   $date = 0,
							   $author = '',
							   $comments = '',
							   $image = '') {
		$newItem = new RSSItem($about, $title, $link,
			$description, $subject, $date, $author,
			$comments, $image);
		$this->rss_itemlist->addRSSItem($newItem);
	} // end function

Re: RSS Feeds broken under PHP 7.2.13-1

Posted: 12 Jan 2019, 17:10
by SteveAtty
That seems to have fixed it.

I really thought it was my PHP configuration

Re: RSS Feeds broken under PHP 7.2.13-1

Posted: 12 Jan 2019, 17:17
by atrol
I opened https://www.mantisbt.org/bugs/view.php?id=25213 to track the issue.
I will provide an official fix for it, so this should become part of next Mantis version 2.20.0
SteveAtty wrote: 12 Jan 2019, 17:10 I really thought it was my PHP configuration
Yes and no. I didn't try, but I assume this depends on PHP error settings.

Re: RSS Feeds broken under PHP 7.2.13-1

Posted: 12 Jan 2019, 17:20
by SteveAtty
I'd got all messages turned on but wasn't seeing that at all.

Thanks for the rapid solution