mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/14277] Fix undefined index error in migrations
PHPBB3-14277
This commit is contained in:
parent
d8760568b6
commit
e02432ec82
2 changed files with 15 additions and 2 deletions
|
@ -243,8 +243,21 @@
|
||||||
*/
|
*/
|
||||||
function parseMessage(messageJSON) {
|
function parseMessage(messageJSON) {
|
||||||
$('#loading_indicator').css('display', 'none');
|
$('#loading_indicator').css('display', 'none');
|
||||||
|
var responseObject;
|
||||||
|
|
||||||
var responseObject = JSON.parse(messageJSON);
|
try {
|
||||||
|
responseObject = JSON.parse(messageJSON);
|
||||||
|
}
|
||||||
|
catch (err) {
|
||||||
|
if (window.console) {
|
||||||
|
console.log('Failed to parse JSON object\n\nMessage: ' + err.message + '\n\nServer Response: ' + messageJSON);
|
||||||
|
} else {
|
||||||
|
alert('Failed to parse JSON object\n\nMessage: ' + err.message + '\n\nServer Response: ' + messageJSON);
|
||||||
|
}
|
||||||
|
|
||||||
|
resetPolling();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Parse object
|
// Parse object
|
||||||
if (responseObject.hasOwnProperty('errors')) {
|
if (responseObject.hasOwnProperty('errors')) {
|
||||||
|
|
|
@ -262,7 +262,7 @@ class module implements \phpbb\db\migration\tool\tool_interface
|
||||||
|
|
||||||
// Success
|
// Success
|
||||||
$module_log_name = ((isset($this->user->lang[$data['module_langname']])) ? $this->user->lang[$data['module_langname']] : $data['module_langname']);
|
$module_log_name = ((isset($this->user->lang[$data['module_langname']])) ? $this->user->lang[$data['module_langname']] : $data['module_langname']);
|
||||||
$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_MODULE_ADD', false, array($module_log_name));
|
$phpbb_log->add('admin', ANONYMOUS, $user->ip, 'LOG_MODULE_ADD', false, array($module_log_name));
|
||||||
|
|
||||||
// Move the module if requested above/below an existing one
|
// Move the module if requested above/below an existing one
|
||||||
if (isset($data['before']) && $data['before'])
|
if (isset($data['before']) && $data['before'])
|
||||||
|
|
Loading…
Add table
Reference in a new issue