diff --git a/libraries/classes/Display/Results.php b/libraries/classes/Display/Results.php index e7dcaff5f6..12c1df39d4 100644 --- a/libraries/classes/Display/Results.php +++ b/libraries/classes/Display/Results.php @@ -738,9 +738,12 @@ class Results : 'false') . ';"'; $hasRealEndInput = $isInnodb && $this->properties['unlim_num_rows'] > $GLOBALS['cfg']['MaxExactCount']; - $posLast = @((int) ceil( - (int) $this->properties['unlim_num_rows'] / $_SESSION['tmpval']['max_rows'] - ) - 1) * intval($_SESSION['tmpval']['max_rows']); + $posLast = 0; + if (is_numeric($_SESSION['tmpval']['max_rows'])) { + $posLast = @((int) ceil( + (int) $this->properties['unlim_num_rows'] / $_SESSION['tmpval']['max_rows'] + ) - 1) * intval($_SESSION['tmpval']['max_rows']); + } $hiddenFields = [ 'db' => $this->properties['db'],