mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
Add check if the page variable is numeric to prevent errors in offset variable
This commit is contained in:
@@ -32,7 +32,7 @@ class SearchController extends BasePageController
|
||||
|
||||
$ordering = $releases->getBrowseOrdering();
|
||||
$orderBy = ($request->has('ob') && \in_array($request->input('ob'), $ordering, false) ? $request->input('ob') : '');
|
||||
$page = $request->has('page') ? $request->input('page') : 1;
|
||||
$page = $request->has('page') && is_numeric($request->input('page')) ? $request->input('page') : 1;
|
||||
$offset = ($page - 1) * config('nntmux.items_per_page');
|
||||
|
||||
$this->smarty->assign(
|
||||
|
||||
Reference in New Issue
Block a user