Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Throw error if no sql query is set

  • Loading branch information...
commit ffd2e5b46ccc0a67bba05d08cc4b98d479611f60 1 parent 24275dd
@madhuracj madhuracj authored
Showing with 10 additions and 1 deletion.
  1. +10 −1 tbl_gis_visualization.php
View
11 tbl_gis_visualization.php
@@ -16,6 +16,16 @@
// Import visualization functions
require_once 'libraries/gis_visualization.lib.php';
+$response = PMA_Response::getInstance();
+// Throw error if no sql query is set
+if (! isset($sql_query) || $sql_query == '') {
+ $response->isSuccess(false);
+ $response->addHTML(
+ PMA_Message::error(__('No SQL query was set to fetch data.'))
+ );
+ exit;
+}
+
// Execute the query and return the result
$result = PMA_DBI_try_query($sql_query);
// Get the meta data of results
@@ -55,7 +65,6 @@
$data[] = $row;
}
-$response = PMA_Response::getInstance();
if (isset($_REQUEST['saveToFile'])) {
$response->disable();
$file_name = $_REQUEST['fileName'];
Please sign in to comment.
Something went wrong with that request. Please try again.