Thursday, November 4, 2010

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

Oh, right! Didn't spot that myself. Thanks, guys!

On Wed, Nov 3, 2010 at 6:05 PM, nurvzy <nurvzy@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.
>
> Hope that helps,
> Nick
>
> On Nov 3, 4:59 am, AD7six <andydawso...@gmail.com> wrote:
>> On Nov 3, 11:56 am, AD7six <andydawso...@gmail.com> wrote:
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> > On Nov 3, 10:44 am, psybear83 <psybea...@gmail.com> wrote:
>>
>> > > Hey guys
>>
>> > > I've implemented a blackhole in my AppController:
>>
>> > > function blackHole($controller, $error) {
>> > >   trigger_error(__('You have been black holed because something went
>> > > horribly wrong!', true), E_USER_WARNING);
>> > >   die;
>>
>> > > }
>>
>> > > Sadly I'm getting a "Missing argument 2 for
>> > > AppController::blackHole()" when the blackHole is called, but
>> > > according to this document my method signature should be valid?!
>>
>> > Does your method signature match that of the method you're overriding
>>
>> correction: Does your method signature match that of the method the
>> security component is expecting you to create ;).
>>
>> http://api.cakephp.org/view_source/security-component/#l-436
>>
>> 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
>

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: