diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index 5b06b3e26e..26d362d79f 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -2358,8 +2358,12 @@ function PMA_displayResultsOperations($the_disp_mode, $analyzed_sql) { * first table of this database, so that tbl_export.php and * the script it calls do not fail */ - if (empty($_url_params['table'])) { + if (empty($_url_params['table']) && !empty($_url_params['db'])) { $_url_params['table'] = PMA_DBI_fetch_value("SHOW TABLES"); + /* No result (probably no database selected) */ + if ($_url_params['table'] === FALSE) { + unset($_url_params['table']); + } } echo PMA_linkOrButton(