diff options
author | William Desportes <williamdes@wdes.fr> | 2021-02-10 13:55:55 +0300 |
---|---|---|
committer | William Desportes <williamdes@wdes.fr> | 2021-02-17 03:48:24 +0300 |
commit | 39e524c2cfa53eb9268ce2c524af8a62af4d2db6 (patch) | |
tree | 8d8e584d7dde556fda25b33ff41e501d077ae44c /libraries | |
parent | 5e5733dcb796b1e7b128a601b74b7da327bd3ca4 (diff) |
Fix #16614 - Correct the dataseek offset on MySQLI extension
Fixes #16614
Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/classes/Display/Results.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libraries/classes/Display/Results.php b/libraries/classes/Display/Results.php index 69146b3d05..325314a242 100644 --- a/libraries/classes/Display/Results.php +++ b/libraries/classes/Display/Results.php @@ -4336,7 +4336,10 @@ class Results ); // fetch last row of the result set - $dbi->dataSeek($dt_result, $this->properties['num_rows'] - 1); + $dbi->dataSeek( + $dt_result, + $this->properties['num_rows'] > 0 ? $this->properties['num_rows'] - 1 : 0 + ); $row = $dbi->fetchRow($dt_result); // check for non printable sorted row data @@ -4566,7 +4569,10 @@ class Results } // fetch last row of the result set - $dbi->dataSeek($dt_result, $this->properties['num_rows'] - 1); + $dbi->dataSeek( + $dt_result, + $this->properties['num_rows'] > 0 ? $this->properties['num_rows'] - 1 : 0 + ); $row = $dbi->fetchRow($dt_result); // @see DbiMysqi::fetchRow & DatabaseInterface::fetchRow |