Fix PMA_mysql_fetch_array return value for last result (bug #905223).

This commit is contained in:
Michal Čihař
2004-03-09 14:21:31 +00:00
parent 8fcbd55910
commit 399318d264
3 changed files with 11 additions and 1 deletions

View File

@@ -8,6 +8,8 @@ $Source$
2004-03-09 Michal Cihar <backtowork@cihar.com> 2004-03-09 Michal Cihar <backtowork@cihar.com>
* libraries/dbi/mysql.dbi.lib.php: Remove possible double charset * libraries/dbi/mysql.dbi.lib.php: Remove possible double charset
conversion. conversion.
* libraries/dbi/mysql.dbi.lib.php, libraries/dbi/mysqli.dbi.lib.php: Fix
PMA_mysql_fetch_array return value for last result (bug #905223).
2004-03-05 Marc Delisle <lem9@users.sourceforge.net> 2004-03-05 Marc Delisle <lem9@users.sourceforge.net>
* libraries/sqlparser.lib.php: bug 909752, floating point digit * libraries/sqlparser.lib.php: bug 909752, floating point digit

View File

@@ -132,6 +132,10 @@ function PMA_mysql_fetch_array($result, $type = FALSE) {
} else { } else {
$data = mysql_fetch_array($result); $data = mysql_fetch_array($result);
} }
/* No data returned => do not touch it */
if (! $data) return $data;
if (PMA_MYSQL_INT_VERSION >= 40100 if (PMA_MYSQL_INT_VERSION >= 40100
|| !(isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding'] && $allow_recoding)) { || !(isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding'] && $allow_recoding)) {
/* No recoding -> return data as we got them */ /* No recoding -> return data as we got them */

View File

@@ -121,6 +121,10 @@ function PMA_mysqli_fetch_array($result, $type = FALSE) {
} else { } else {
$data = mysqli_fetch_array($result); $data = mysqli_fetch_array($result);
} }
/* No data returned => do not touch it */
if (! $data) return $data;
if (PMA_MYSQL_INT_VERSION >= 40100 if (PMA_MYSQL_INT_VERSION >= 40100
|| !(isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding'] && $allow_recoding)) { || !(isset($cfg['AllowAnywhereRecoding']) && $cfg['AllowAnywhereRecoding'] && $allow_recoding)) {
/* No recoding -> return data as we got them */ /* No recoding -> return data as we got them */