RSS Feeds broken under PHP 7.2.13-1

Get help from other users here.

Moderators: Developer, Contributor

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

RSS Feeds broken under PHP 7.2.13-1

Post by SteveAtty » Jan 12, 2019 10:53 am

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: 7659
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: RSS Feeds broken under PHP 7.2.13-1

Post by atrol » Jan 12, 2019 12:03 pm

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: Jan 29, 2017 6:05 am

Re: RSS Feeds broken under PHP 7.2.13-1

Post by SteveAtty » Jan 12, 2019 12:10 pm

That seems to have fixed it.

I really thought it was my PHP configuration

atrol
Site Admin
Posts: 7659
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: RSS Feeds broken under PHP 7.2.13-1

Post by atrol » Jan 12, 2019 12:17 pm

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:
Jan 12, 2019 12:10 pm
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: Jan 29, 2017 6:05 am

Re: RSS Feeds broken under PHP 7.2.13-1

Post by SteveAtty » Jan 12, 2019 12:20 pm

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

Thanks for the rapid solution

Post Reply