diff --git a/error_report.php b/error_report.php index ca81dd7721..719756ca96 100644 --- a/error_report.php +++ b/error_report.php @@ -10,7 +10,7 @@ require_once 'libraries/error_report.lib.php'; $response = PMA_Response::getInstance(); -if (isset($_REQUEST['exception_type']) +if (isset($_REQUEST['exception_type']) && $_REQUEST['exception_type'] == 'js' ) { if (isset($_REQUEST['send_error_report']) @@ -73,14 +73,14 @@ if (isset($_REQUEST['exception_type']) } else { $response->addHTML(PMA_getErrorReportForm()); } -} elseif (isset($_REQUEST['exception_type']) +} elseif (isset($_REQUEST['exception_type']) && $_REQUEST['exception_type'] == 'php' ) { if (isset($_REQUEST['send_error_report']) && $_REQUEST['send_error_report'] == '1' ) { /** - * Prevent inifnite error submission. + * Prevent inifnite error submission. * Happens in case error submissions fails. * If reporting is done in some time interval, just clear them & clear json data too. */ @@ -112,7 +112,7 @@ if (isset($_REQUEST['exception_type']) $decoded_response = json_decode($server_response, true); $success = !empty($decoded_response) ? $decoded_response["success"] : false; } - + if ($GLOBALS['cfg']['SendErrorReports'] == 'ask') { if ($success) { $errSubmitMsg = PMA_Message::error( diff --git a/js/functions.js b/js/functions.js index c5e8975d44..7f9a86694c 100644 --- a/js/functions.js +++ b/js/functions.js @@ -4384,15 +4384,15 @@ function PMA_previewSQL($form) * Ignore the displayed php errors. * Simply removes the displayed errors. * - * @param clearPrevErrors whether to clear errors stored + * @param clearPrevErrors whether to clear errors stored * in $_SESSION['prev_errors'] at server * */ function PMA_ignorePhpErrors(clearPrevErrors){ - if (typeof(clearPrevErrors) === "undefined" + if (typeof(clearPrevErrors) === "undefined" || clearPrevErrors === null - ) { - str = false; + ) { + str = false; } // send AJAX request to error_report.php with send_error_report=0, exception_type=php & token. // It clears the prev_errors stored in session.