Re: Strange problem setting a variable
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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Strange problem setting a variable
On Thu, Dec 23, 2010 at 7:51 AM, euromark dereurom...@googlemail.com wrote: only in cake1.2 in cake1.3 this is fixed Yes, that was an unwelcome feature. In the meantime, for 1.2.x, you can do: $this-set(compact('category_label'), false); 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: Strange problem setting a variable
Excellent, I'll remember to do that On 23 December 2010 18:46, cricket zijn.digi...@gmail.com wrote: On Thu, Dec 23, 2010 at 7:51 AM, euromark dereurom...@googlemail.com wrote: only in cake1.2 in cake1.3 this is fixed Yes, that was an unwelcome feature. In the meantime, for 1.2.x, you can do: $this-set(compact('category_label'), false); 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+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en