[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;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
$topic_type = $str_where = $user_link = $post_link = '';
|
// Method was called with unsupported type
|
||||||
$topic_order = 't.topic_time DESC';
|
throw new \InvalidArgumentexception($user->lang('B3P_WRONG_METHOD_CALL', __FUNCTION__));
|
||||||
// maybe use trigger_error here, as this shouldn't happen
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($type == 'announcements' && $global_f < 1)
|
if ($type == 'announcements' && $global_f < 1)
|
||||||
|
|||||||
@@ -37,4 +37,5 @@ $lang = array_merge($lang, array(
|
|||||||
'PORTAL' => 'Portal',
|
'PORTAL' => 'Portal',
|
||||||
'VIEWING_PORTAL' => 'Portal page',
|
'VIEWING_PORTAL' => 'Portal page',
|
||||||
'BACK' => 'Back',
|
'BACK' => 'Back',
|
||||||
|
'B3P_WRONG_METHOD_CALL' => 'Incorrect call to method %s',
|
||||||
));
|
));
|
||||||
|
|||||||
Reference in New Issue
Block a user