1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-23 11:35:24 +02:00

Merge branch '3.1.x'

This commit is contained in:
Marc Alexander
2015-05-30 11:33:50 +02:00

View File

@ -262,8 +262,15 @@ phpbb.ajaxify = function(options) {
console.log('AJAX error. status: ' + textStatus + ', message: ' + errorThrown);
}
phpbb.clearLoadingTimeout();
var errorText = false;
if (typeof errorThrown === 'string' && errorThrown.length > 0) {
var responseText, errorText = false;
try {
responseText = JSON.parse(jqXHR.responseText);
responseText = responseText.message;
} catch (e) {}
if (typeof responseText === 'string' && responseText.length > 0) {
errorText = responseText;
}
else if (typeof errorThrown === 'string' && errorThrown.length > 0) {
errorText = errorThrown;
}
else {