the last argument of function should have reference variable to hold object, as previous code for this function invoking consisted of object usage i.e. <code>$this-></code>. So just add <code>&$form</code> as the fourth argument instead of $form.