undefined index when creating a table

This commit is contained in:
Marc Delisle
2007-03-31 11:15:24 +00:00
parent 306b1b65c6
commit f7d9e324a1

View File

@@ -983,9 +983,9 @@ function PMA_showMessage($message, $sql_query = null)
} // end if ... elseif } // end if ... elseif
// Checks if the table needs to be repaired after a TRUNCATE query. // Checks if the table needs to be repaired after a TRUNCATE query.
// @todo this should only be done if isset($GLOBALS['sql_query']), what about $GLOBALS['display_query']??? // @todo what about $GLOBALS['display_query']???
// @todo this is REALLY the wrong place to do this - very unexpected here // @todo this is REALLY the wrong place to do this - very unexpected here
if (strlen($GLOBALS['table']) && strlen($GLOBALS['sql_query']) if (strlen($GLOBALS['table']) && isset($GLOBALS['sql_query']) && strlen($GLOBALS['sql_query'])
&& $GLOBALS['sql_query'] == 'TRUNCATE TABLE ' . PMA_backquote($GLOBALS['table'])) { && $GLOBALS['sql_query'] == 'TRUNCATE TABLE ' . PMA_backquote($GLOBALS['table'])) {
if (!isset($tbl_status)) { if (!isset($tbl_status)) {
$result = @PMA_DBI_try_query('SHOW TABLE STATUS FROM ' . PMA_backquote($GLOBALS['db']) . ' LIKE \'' . PMA_sqlAddslashes($GLOBALS['table'], true) . '\''); $result = @PMA_DBI_try_query('SHOW TABLE STATUS FROM ' . PMA_backquote($GLOBALS['db']) . ' LIKE \'' . PMA_sqlAddslashes($GLOBALS['table'], true) . '\'');