Skip to content

Commit

Permalink
Fix haraka#468 - undefined variable
Browse files Browse the repository at this point in the history
  • Loading branch information
smfreegard committed Feb 17, 2014
1 parent cfcb887 commit 071197b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/spamassassin.js
Expand Up @@ -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];
}
}
Expand Down

0 comments on commit 071197b

Please sign in to comment.