version 0.7.0-dev utils.slugify bug when str is null



  • Bug Reproduce:
    1.goto page /users/latest
    2.click administrator user
    3.click user group administrators
    4.then raise this error
    25/2 10:00 [19807] - info: NodeBB is now listening on: 0.0.0.0:4567
    25/2 10:00 [19807] - info: NodeBB Ready
    25/2 10:01 [19807] - error: TypeError: Cannot call method 'replace' of null
    at Object.module.exports.utils.slugify (/opt/projects/nodejs/bbs/public/src/utils.js:78:17)
    at Groups.exists (/opt/projects/nodejs/bbs/src/groups.js:441:21)
    at /opt/projects/nodejs/bbs/node_modules/async/lib/async.js:656:23
    at fn (/opt/projects/nodejs/bbs/node_modules/async/lib/async.js:641:34)
    at Object._onImmediate (/opt/projects/nodejs/bbs/node_modules/async/lib/async.js:557:34)
    at processImmediate [as _immediateCallback] (timers.js:330:15)
    TypeError: Cannot call method 'replace' of null
    at Object.module.exports.utils.slugify (/opt/projects/nodejs/bbs/public/src/utils.js:78:17)
    at Groups.exists (/opt/projects/nodejs/bbs/src/groups.js:441:21)
    at /opt/projects/nodejs/bbs/node_modules/async/lib/async.js:656:23
    at fn (/opt/projects/nodejs/bbs/node_modules/async/lib/async.js:641:34)
    at Object._onImmediate (/opt/projects/nodejs/bbs/node_modules/async/lib/async.js:557:34)
    at processImmediate [as _immediateCallback] (timers.js:330:15)
    25/2 10:01 [19807] - info: [app] Shutdown (SIGTERM/SIGINT) Initialised.
    25/2 10:01 [19807] - info: [app] Database connection closed.
    25/2 10:01 [19807] - info: [app] Web server closed to connections.
    25/2 10:01 [19807] - info: [app] Shutdown complete.


  • Admin



  • @julian :wow! so efficient +1:


 

| |

Looks like your connection to NodeBB was lost, please wait while we try to reconnect.