Skip to content

Commit c958e27

Browse files
authored
fix #17779 - PHP 8 numeric operation (#17827)
Fixes #17779 php8 throws exception in spite of @ symbol so work around it Signed-off-by: Alex Liberman <alex@zoosmart.us>
1 parent 0404251 commit c958e27

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

libraries/classes/Display/Results.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -738,9 +738,12 @@ private function getTableNavigation(
738738
: 'false') . ';"';
739739

740740
$hasRealEndInput = $isInnodb && $this->properties['unlim_num_rows'] > $GLOBALS['cfg']['MaxExactCount'];
741-
$posLast = @((int) ceil(
742-
(int) $this->properties['unlim_num_rows'] / $_SESSION['tmpval']['max_rows']
743-
) - 1) * intval($_SESSION['tmpval']['max_rows']);
741+
$posLast = 0;
742+
if (is_numeric($_SESSION['tmpval']['max_rows'])) {
743+
$posLast = @((int) ceil(
744+
(int) $this->properties['unlim_num_rows'] / $_SESSION['tmpval']['max_rows']
745+
) - 1) * intval($_SESSION['tmpval']['max_rows']);
746+
}
744747

745748
$hiddenFields = [
746749
'db' => $this->properties['db'],

0 commit comments

Comments
 (0)