From 5e3556e618b7b917d5ec215862658867ac3999d3 Mon Sep 17 00:00:00 2001 From: chansizzle <14916599+chansizzle@users.noreply.github.com> Date: Wed, 18 Dec 2019 20:15:59 -0700 Subject: [PATCH] Update device_vendor_functions.php (#4960) --- app/devices/device_vendor_functions.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/devices/device_vendor_functions.php b/app/devices/device_vendor_functions.php index 84aaa24a28..e58a980bff 100644 --- a/app/devices/device_vendor_functions.php +++ b/app/devices/device_vendor_functions.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2016-2017 + Portions created by the Initial Developer are Copyright (C) 2016-2019 the Initial Developer. All Rights Reserved. Contributor(s): @@ -74,10 +74,12 @@ //prepare to page the results $rows_per_page = ($_SESSION['domain']['paging']['numeric'] != '') ? $_SESSION['domain']['paging']['numeric'] : 50; $param = ""; - $page = $_GET['page']; - if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } - list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page); - $offset = $rows_per_page * $page; + if (isset($_GET['page'])) { + $page = $_GET['page']; + if (strlen($page) == 0) { $page = 0; $_GET['page'] = 0; } + list($paging_controls, $rows_per_page, $var3) = paging($num_rows, $param, $rows_per_page); + $offset = $rows_per_page * $page; + } //get the list $sql = str_replace('count(*)', '*', $sql);