This may be more of a PHP issue than Cake but ya'll gurus probably
know why this is a problem.

In a controller for Bait function foo

function test()
{
Bait::foo($xxx); // works correctly
$this->Bait->foo($xxx); // does not work
}

In Bait model function foo() takes the parm by ref and sets it's
value:

function foo(&$msg)
{
$msg = "HOWDY DOODY";
}

ERROR is
Notice (8): Undefined variable:  xxx [CORE/app/controllers/
baits_controller.php, line 71]

If I put function foo within the Bait controller class $this->foo()
works fine. However when I put it in the model using the $this->Bait-
>foo() invocation syntax seems to ignore the parameter by reference.

What am I missing here? BTW this is a dramatically pared down sample
from a real application.

Thanks in advance,
Mike

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to