Thursday, November 4, 2010

Re: blackHole($controller, $string) leads to "Missing argument 2 for AppController::blackHole()" *+

On Nov 3, 6:05 pm, nurvzy <nur...@gmail.com> wrote:
> What AD is saying is the security component is setting $error to an
> empty string (in the method header) if it doesn't exist, you are not.
> As such when the second argument isn't given in *your* method, instead
> of $error being set to '' you'll get a notification.

Well, not really - The docs are describing the security *component*
blackHole signature.

look at the source or just think: why would a controller function ever
have $controller as the first param.

func_get_args will tell you you're not receiving array($controller,
'auth') but simply array('auth') your blackhole function should only
have 1 param, because that's all it's going to receive.

AD

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: