diff --git a/ChangeLog b/ChangeLog index 5eec27b2f4..514cfc0676 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,7 @@ phpMyAdmin - ChangeLog 4.2.8.0 (not yet released) - bug #4516 Odd export behavior - bug #4519 Uncaught TypeError: Cannot read property 'success' of null +- bug #4520 sql.js: cannot read property 4.2.7.1 (2014-08-17) - bug #4501 [security] XSS in table browse page diff --git a/js/sql.js b/js/sql.js index aad4a454e8..aa4ca3b346 100644 --- a/js/sql.js +++ b/js/sql.js @@ -284,7 +284,7 @@ AJAX.registerOnload('sql.js', function () { PMA_prepareForAjaxRequest($form); $.post($form.attr('action'), $form.serialize(), function (data) { - if (data.success === true) { + if (typeof data !== 'undefined' && data.success === true) { // success happens if the query returns rows or not // // fade out previous messages, if any @@ -373,7 +373,7 @@ AJAX.registerOnload('sql.js', function () { } } } - } else if (data.success === false) { + } else if (typeof data !== 'undefined' && data.success === false) { // show an error message that stays on screen $('#sqlqueryform').before(data.error); $sqlqueryresults.hide();