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

umm where?
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; }