From dc61c4e9e4b8aa3d7d0fecba19fd6ecfd0537672 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 1 Oct 2003 20:18:36 +0000 Subject: [PATCH] bug 815822 --- ChangeLog | 1 + libraries/export/sql.php3 | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 03eceab30..80128fe54 100755 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ $Source$ 2003-10-01 Marc Delisle * lang/slovenian update, thanks to Kositer Uros * lang/norwegian: Updated, thanks to Sven-Erik Andersen (sven-erik). + * libraries/export/sql.php3: bug 815822 Undefined index/offset 2003-10-01 Alexander M. Turek * translators.html: Better link. diff --git a/libraries/export/sql.php3 b/libraries/export/sql.php3 index 8da5e14ab..57d08246c 100644 --- a/libraries/export/sql.php3 +++ b/libraries/export/sql.php3 @@ -443,8 +443,11 @@ function PMA_getTableContentFast($db, $table, $crlf, $error_url, $sql_query) // Checks whether the field is an integer or not for ($j = 0; $j < $fields_cnt; $j++) { - //$field_set[$j] = PMA_backquote(PMA_mysql_field_name($result, $j), $use_backquotes); - $field_set[$j] = PMA_backquote($analyzed_sql[0]['select_expr'][$j]['column'], $use_backquotes); + if (isset($analyzed_sql[0]['select_expr'][$j]['column'])) { + $field_set[$j] = PMA_backquote($analyzed_sql[0]['select_expr'][$j]['column'], $use_backquotes); + } else { + $field_set[$j] = PMA_backquote(PMA_mysql_field_name($result, $j), $use_backquotes); + } $type = $field_types[$field_set[$j]];