1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-28 07:41:55 +03:00

Fix #16614 - Correct the dataseek offset on MySQLI extension

Fixes #16614
Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes
2021-02-10 11:55:55 +01:00
parent 5e5733dcb7
commit 39e524c2cf

View File

@@ -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