Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraliber4079 <alex@zoosmart.us>2022-11-05 20:46:58 +0300
committerGitHub <noreply@github.com>2022-11-05 20:46:58 +0300
commitc958e27bfaa3aae77353b6624206da0cb38b30af (patch)
tree3a469c5a9836e73efdefa0eb5b3e40623aa76565
parent04042517a51b76cb030167ffdcb87ba350ecabd8 (diff)
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>
-rw-r--r--libraries/classes/Display/Results.php9
1 files changed, 6 insertions, 3 deletions
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'],