Permalink
Browse files

Fix #468 - undefined variable

  • Loading branch information...
1 parent cfcb887 commit 071197b5fa5f8957c4451eac7f64011d8c64d810 @smfreegard smfreegard committed Feb 17, 2014
Showing with 3 additions and 1 deletion.
  1. +3 −1 plugins/spamassassin.js
View
@@ -85,7 +85,9 @@ exports.hook_data_post = function (next, connection) {
if (spamd_response.tests === undefined) {
// strip the 'tests' from the X-Spam-Status header
var tests;
- if (tests = /tests=([^ ]+)/.exec(spamd_response.headers['Status'].replace(/\r?\n\t/g,''))) {
+ if (spamd_response.headers['Status'] &&
+ tests = /tests=([^ ]+)/.exec(spamd_response.headers['Status'].replace(/\r?\n\t/g,'')))
+ {
spamd_response.tests = tests[1];
}
}

0 comments on commit 071197b

Please sign in to comment.