[ticket/301] Throw Exception on incorrect call of phpbb_fetch_posts
B3P-301
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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',
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user