From 34d03eac93bcc500181bbe535d9c8daf9f534352 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 18 Jun 2005 11:07:05 +0000 Subject: [PATCH] bug 1221602, undefined variable when trying to use a reserved word as an identifier --- ChangeLog | 4 ++++ libraries/sqlparser.lib.php | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 996611950..a5da6e53f 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-06-18 Marc Delisle + * libraries/sqlparser.lib.php: bug 1221602, undefined variable when trying + to use a reserved word as an identifier + 2005-06-12 Marc Delisle * tbl_properties.inc.php: visually bind the Add x fields dialog to its submit button diff --git a/libraries/sqlparser.lib.php b/libraries/sqlparser.lib.php index 6aa54d475..ac641284d 100644 --- a/libraries/sqlparser.lib.php +++ b/libraries/sqlparser.lib.php @@ -1681,7 +1681,6 @@ if ($is_minimum_common == FALSE) { } } - if (($arr[$i]['type'] == 'alpha_columnAttrib')) { $upper_data = strtoupper($arr[$i]['data']); if ($seen_create_table && $in_create_table_fields) { @@ -1691,10 +1690,9 @@ if ($is_minimum_common == FALSE) { } } - if (($arr[$i]['type'] == 'alpha_columnType')) { $upper_data = strtoupper($arr[$i]['data']); - if ($seen_create_table && $in_create_table_fields) { + if ($seen_create_table && $in_create_table_fields && isset($current_identifier)) { $create_table_fields[$current_identifier]['type'] = $upper_data; if ($upper_data == 'TIMESTAMP') { $in_timestamp_options = TRUE;