On Mon, Sep 28, 2009 at 11:20 AM, Bert Van den Brande <cyr...@gmail.com> wrote:
> I don't entirely understand why moving the target action from private to
> protected or public results in the $viewVars being set or not set ?

The first line in setAction() changes the controller's $action:

$this->action = $action;

Then, the last line of the method fails on call_user_func_array()
because the given action is private:

Warning (2): call_user_func_array()
[http://php.net/function.call-user-func-array]: First argument is
expected to be a valid callback, 'TransactionsController::error' was
given [CORE_1.2.5/cake/libs/controller/controller.php, line 697]

However, it's not a fatal error and the controller's $action has
already been changed, so it's the view for this that is used in
render() even though the action is never called.

Anyway, it's not a Cake bug. I just wanted to post this for anyone
else who might run into it.

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

Reply via email to