From 7c0a63a4a0bec7f2fbc9c26f91cef86461141118 Mon Sep 17 00:00:00 2001 From: Rouslan Placella Date: Mon, 18 Nov 2013 20:49:03 +0000 Subject: [PATCH 1/2] Fixed bug #4117 --- js/error_report.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/js/error_report.js b/js/error_report.js index c699550a3e..2a78610f3b 100644 --- a/js/error_report.js +++ b/js/error_report.js @@ -206,20 +206,20 @@ var ErrorReport = { * @return object */ _get_report_data: function (exception) { - var token = PMA_commonParams.get('token'); - var report_data = { "ajax_request": true, - "token": token, + "token": PMA_commonParams.get('token'), "exception": exception, "current_url": window.location.href, - "microhistory": ErrorReport._get_microhistory(), - "scripts": AJAX.cache.pages[AJAX.cache.current - 1].scripts.map( + "microhistory": ErrorReport._get_microhistory() + }; + if (typeof AJAX.cache.pages[this.current - 1] === 'undefined') { + report_data.scripts = AJAX.cache.pages[AJAX.cache.current - 1].scripts.map( function (script) { return script.name; } - ) - }; + ); + } return report_data; }, /** From 0e7a724f84d89dfb56f102935ef036217df18fc5 Mon Sep 17 00:00:00 2001 From: Rouslan Placella Date: Mon, 18 Nov 2013 20:49:28 +0000 Subject: [PATCH 2/2] Dropped unused function --- js/error_report.js | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/js/error_report.js b/js/error_report.js index 2a78610f3b..90ea3bb61a 100644 --- a/js/error_report.js +++ b/js/error_report.js @@ -222,24 +222,6 @@ var ErrorReport = { } return report_data; }, - /** - * Returns the exception after removing the url of the script file and - * concatenating the context - * - * @param object exception info - * - * @return object - */ - _simplify_exception: function (exception) { - exception.stack = exception.stack.map(function (level) { - if (/get_scripts\.js\.php/.test(level.url)) { - level.url = "get_scripts.js.php"; - } - //level.context = level.context.join("\n"); - return level; - }); - return exception; - }, /** * Wraps all global functions that start with PMA_ *