diff --git a/js/error_report.js b/js/error_report.js index 466bf96099..c1257c9763 100644 --- a/js/error_report.js +++ b/js/error_report.js @@ -224,7 +224,7 @@ var ErrorReport = { 'server': PMA_commonParams.get('server'), 'ajax_request': true, 'exception': exception, - 'current_url': window.location.href, + 'url': window.location.href, 'exception_type': 'js' }; if (AJAX.scriptHandler._scripts.length > 0) { diff --git a/libraries/classes/ErrorReport.php b/libraries/classes/ErrorReport.php index 2d0321c350..3ae5aab365 100644 --- a/libraries/classes/ErrorReport.php +++ b/libraries/classes/ErrorReport.php @@ -99,6 +99,11 @@ class ErrorReport $exception["uri"] = $uri; $report["script_name"] = $scriptName; unset($exception["url"]); + } else if (isset($_POST["url"])) { + list($uri, $scriptName) = $this->sanitizeUrl($_POST["url"]); + $exception["uri"] = $uri; + $report["script_name"] = $scriptName; + unset($_POST["url"]); } else { $report["script_name"] = null; } @@ -175,7 +180,7 @@ class ErrorReport } // get script name - preg_match("<([a-zA-Z\-_\d]*\.php)$>", $components["path"], $matches); + preg_match("<([a-zA-Z\-_\d\.]*\.php|js\/[a-zA-Z\-_\d\/\.]*\.js)$>", $components["path"], $matches); if (count($matches) < 2) { $scriptName = 'index.php'; } else {