missing argument

Permalink
within controller.php I have this:
class BasicTestBlockController extends BlockController {
public $answercomparison = "none";
//a lot of stuff that works just fine
//and then
public function action_submit_form(&$answercomparison){
//the above line (line 25) does not work and throws a warning
//more stuff
$answercomparison =  <<<EOT
<div> Your answers: 1 $varzee1 </div>
EOT;
   }
public function return_answers($answercomparison) {
return $answercomparison;
}
}


In view.php I have:

echo $controller->return_answers();
echo $controller->answercomparison;


this produces "none," just as the attribute was defined in
$controller

the methods never touch $answercomparison and instead I get this warning:

Warning: Missing argument 1 for BasicTestBlockController::action_submit_form(), called in /hermes/bosweb26a/b1901/ipg.ilearneditallcom/concrete/core/models/block.php on line 411 and defined in /hermes/bosweb26a/b1901/ipg.ilearneditallcom/blocks/basic_test/controller.php on line 25

Warning: Cannot modify header information - headers already sent by (output started at /hermes/bosweb26a/b1901/ipg.ilearneditallcom/blocks/basic_test/controller.php:25) in /hermes/bosweb26a/b1901/ipg.ilearneditallcom/concrete/core/libraries/view.php on line 917

 
wclark07 replied on at Permalink Reply
Oh. Because when I called the function I didn't pass it anything. Funny how you have to publicly post how foolish you have been on a forum before you are permitted to find your error.