mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-28 09:31:17 +01:00
Merge branch 'master' into develop
This commit is contained in:
@@ -103,7 +103,7 @@
|
||||
"nodebb-plugin-dbsearch": "6.2.13",
|
||||
"nodebb-plugin-emoji": "6.0.2",
|
||||
"nodebb-plugin-emoji-android": "4.1.1",
|
||||
"nodebb-plugin-markdown": "13.1.0",
|
||||
"nodebb-plugin-markdown": "13.1.1",
|
||||
"nodebb-plugin-mentions": "4.7.0",
|
||||
"nodebb-plugin-spam-be-gone": "2.3.1",
|
||||
"nodebb-plugin-web-push": "0.7.3",
|
||||
|
||||
@@ -275,8 +275,12 @@ async function fireActionHook(hook, hookList, params) {
|
||||
winston.warn(`[plugins] Expected method for hook '${hook}' in plugin '${hookObj.id}' not found, skipping.`);
|
||||
}
|
||||
} else {
|
||||
// eslint-disable-next-line
|
||||
await hookObj.method(params);
|
||||
try {
|
||||
// eslint-disable-next-line
|
||||
await hookObj.method(params);
|
||||
} catch (err) {
|
||||
winston.error(`[plugins] Error in hook ${hookObj.id}@${hookObj.hook} \n${err.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -234,7 +234,9 @@ module.exports = function (User) {
|
||||
}
|
||||
|
||||
async function deleteImages(uid) {
|
||||
const folder = path.join(nconf.get('upload_path'), 'profile', `uid-${uid}`);
|
||||
await rimraf(folder);
|
||||
if (utils.isNumber(uid)) {
|
||||
const folder = path.join(nconf.get('upload_path'), 'profile', `uid-${uid}`);
|
||||
await rimraf(folder);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user