-
Bug
-
Resolution: Fixed
-
3.0.6
-
None
-
PHP Environment:
Database:
The current implementation of feed.php returns a 503 error page from /feed.php?f=<non-existent-id>.
Relatively quick fix with near zero overhead:
Find (near top of source):
$feed->open();
|
Replace with:
if ($feed->open() === false)
|
{
|
trigger_error('NO_FEED');
|
}
|
Find (in phpbb_feed::open()):
if (!$this->forum_id && !$this->topic_id)
|
{
|
return;
|
}
|
Replace with:
if (!$this->forum_id && !$this->topic_id)
|
{
|
return true;
|
}
|
Find (in phpbb_feed::open()):
$global_vars['FEED_MODE'] = $user->lang['FORUM'] . ': ' . $db->sql_fetchfield('forum_name');
|
Replace with:
$forum_name = $db->sql_fetchfield('forum_name');
|
if ($forum_name === false)
|
{
|
return false;
|
}
|
|
$global_vars['FEED_MODE'] = $user->lang['FORUM'] . ': ' . $forum_name;
|
Find (in phpbb_feed::open()):
$global_vars['FEED_MODE'] = $user->lang['TOPIC'] . ': ' . $db->sql_fetchfield('topic_title');
|
|
$db->sql_freeresult($result);
|
}
|
Replace with:
$topic_title = $db->sql_fetchfield('topic_title');
|
if ($topic_title === false)
|
{
|
return false;
|
}
|
|
$global_vars['FEED_MODE'] = $user->lang['TOPIC'] . ': ' . $topic_title;
|
|
$db->sql_freeresult($result);
|
}
|
return true;
|
Add to the end of 'function open()' in the remaining classes (the 3 classes which extend phpbb_feed):
return true;
|