Skip to content

Commit

Permalink
check var before use
Browse files Browse the repository at this point in the history
  • Loading branch information
matphillips committed Mar 11, 2016
1 parent 2bc50ba commit ea2f404
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sources/source-PhoneSpamFilter_UK.module
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class PhoneSpamFilter_UK extends superfecta_base {
$this->DebugPrint(' value of ' . $value . ' returned ... ');

$score = $value;
if ($score > $run_param['SPAM_Threshold']) {
$threshold = array_key_exists('SPAM_Threshold', $run_param) ? $run_param['SPAM_Threshold'] : 0;
if ($score > $threshold) {
$this->spam = true;
$this->DebugPrint(" determined to be SPAM");
} else {
Expand Down

0 comments on commit ea2f404

Please sign in to comment.