RSS Feeds broken under PHP 7.2.13-1

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
SteveAtty
Posts: 5
Joined: 29 Jan 2017, 11:05

RSS Feeds broken under PHP 7.2.13-1

Post 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?
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: RSS Feeds broken under PHP 7.2.13-1

Post 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
Please use Search before posting and read the Manual
SteveAtty
Posts: 5
Joined: 29 Jan 2017, 11:05

Re: RSS Feeds broken under PHP 7.2.13-1

Post by SteveAtty »

That seems to have fixed it.

I really thought it was my PHP configuration
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: RSS Feeds broken under PHP 7.2.13-1

Post 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.
Please use Search before posting and read the Manual
SteveAtty
Posts: 5
Joined: 29 Jan 2017, 11:05

Re: RSS Feeds broken under PHP 7.2.13-1

Post by SteveAtty »

I'd got all messages turned on but wasn't seeing that at all.

Thanks for the rapid solution
Post Reply