Thursday, December 23, 2010

Re: Strange problem setting a variable

only in cake1.2
in cake1.3 this is fixed

On 23 Dez., 12:56, Stephen <step...@ninjacodermonkey.co.uk> wrote:
> Fixed it
>
> I am getting the following error when I access this function from the view:
>
> > *Notice (8): Undefined variable: category_label
> > [APP\views\orders\add_category.ctp, line 4]
>
> > *Does anybody have any idea why "$this->set(compact( ..." doesn't seem to
> > be sending the variable to the view?
>
> It seems that when you use compact with a variable that contains an
> underscore, the variable will become Inflected.
>
> "category_label" becomes $categoryLabel in the view.
>
> Doh.
>
> --
> Kind Regards
>  Stephen @ NinjaCoderMonkey
>
>  www.ninjacodermonkey.co.uk

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate