Do no try to parse empty SQL query (bug #1303994).

This commit is contained in:
Michal Čihař
2005-09-26 19:14:12 +00:00
parent 64bd56dfba
commit d5b78243d8
2 changed files with 4 additions and 0 deletions

View File

@@ -18,6 +18,8 @@ $Source$
* libraries/display_import.lib.php: Sort list of import plugins.
* mult_submits.inc.php, tbl_properties_structure.php: Support for browsing
selected columns (RFE #1275909).
* libraries/common.lib.php: Do no try to parse empty SQL query (bug
#1303994).
2005-09-25 Marc Delisle <lem9@users.sourceforge.net>
* server_privileges.php: support MySQL 5 privileges

View File

@@ -597,6 +597,8 @@ if ($is_minimum_common == FALSE) {
// Revised, Robbat2 - 13 January 2003, 2:59PM
if (!function_exists('PMA_SQP_isError') || PMA_SQP_isError()) {
$formatted_sql = htmlspecialchars($the_query);
} elseif (empty($the_query)) {
$formatted_sql = '';
} else {
$formatted_sql = PMA_formatSql(PMA_SQP_parse(PMA_sanitize($the_query)), $the_query);
}