Typo

Permalink 1 user found helpful
In the example the instance of the object should be named $banned not $val?

 
Mnkras replied on at Permalink Reply
Mnkras
umm where?
jasteele12 replied on at Permalink Reply
jasteele12
forerunners is correct, $val should be replaced with $banned *everywhere*

$banned = Loader::helper('validation/banned_words');  // not $val
// there is no $val variable...
if($banned->hasBannedWords($insult)) { //ban them; } else { //hug them; }
if($banned->isBannedWord($badWord)) { //ban them; } else { //hug them; }