[ticket/301] Throw Exception on incorrect call of phpbb_fetch_posts

B3P-301
This commit is contained in:
Marc Alexander
2014-07-09 20:04:02 +02:00
parent 9d678d86a9
commit 0a276c6ec6
2 changed files with 3 additions and 3 deletions

View File

@@ -166,9 +166,8 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
break;
default:
$topic_type = $str_where = $user_link = $post_link = '';
$topic_order = 't.topic_time DESC';
// maybe use trigger_error here, as this shouldn't happen
// Method was called with unsupported type
throw new \InvalidArgumentexception($user->lang('B3P_WRONG_METHOD_CALL', __FUNCTION__));
}
if ($type == 'announcements' && $global_f < 1)

View File

@@ -37,4 +37,5 @@ $lang = array_merge($lang, array(
'PORTAL' => 'Portal',
'VIEWING_PORTAL' => 'Portal page',
'BACK' => 'Back',
'B3P_WRONG_METHOD_CALL' => 'Incorrect call to method %s',
));