@ -92,7 +92,7 @@ var db = require('./database'),
return callback(err);
}
if (!mids || !mids.length) {
if (!Array.isArray(mids) || !mids.length) {
return callback(null, []);
@ -214,7 +214,7 @@ var async = require('async'),
Notifications.markRead = function(nid, uid, callback) {
callback = callback || function() {};
if (!parseInt(uid, 10)) {
if (!parseInt(uid, 10) || !parseInt(nid, 10)) {
return callback();