diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 665298b49..6f7064a6b 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -1039,6 +1039,9 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view } else { // Parse SQL if needed $parsed_sql = PMA_SQP_parse($query_base); + if (PMA_SQP_isError()) { + unset($parsed_sql); + } } // Analyze it @@ -1242,8 +1245,8 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice', $is_view } echo '
' . "\n"; - // If we are in an Ajax request, we have most probably been called in - // PMA_ajaxResponse(). Hence, collect the buffer contents and return it + // If we are in an Ajax request, we have most probably been called in + // PMA_ajaxResponse(). Hence, collect the buffer contents and return it // to PMA_ajaxResponse(), which will encode it for JSON. if( $GLOBALS['is_ajax_request'] == true && !isset($GLOBALS['buffer_message']) ) { $buffer_contents = ob_get_contents(); diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index d236b7fda..bb16bbf7f 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -2090,7 +2090,7 @@ function PMA_displayTable(&$dt_result, &$the_disp_mode, $analyzed_sql) 'submit_mult_change', __('Change'), 'b_edit.png'); PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_delete', $delete_text, 'b_drop.png'); - if ($analyzed_sql[0]['querytype'] == 'SELECT') { + if (isset($analyzed_sql[0]) && $analyzed_sql[0]['querytype'] == 'SELECT') { PMA_buttonOrImage('submit_mult', 'mult_submit', 'submit_mult_export', __('Export'), 'b_tblexport.png');