AIM: | theundefined87 |
---|---|
Skype: | TimeFor23 |
Other IM: | felixge.de |
Mobile (USA): | +1 404 3888693 |
Mobile (GER): | +49 162 9391612 |
Twitter: | http://twitter.com/felixge |
You can avoid this by passing anything as the second parameter, so:
$this->set( array('my_var'=>'my val'), false );
will come through to your view as $my_var, not $myVar.
On Nov 15, 7:03 am, Felix Geisendörfer <haimu...@gmail.com> wrote:
> Hey folks,
>
> ok, this change has been made a long time ago (6 months ...), but for
> some reason I just noticed it now (and the impact it had on my app).
>
> If you use Controller->set('a', 'b') you're fine.
>
> If you use Controller->set($data); you might be in trouble.
>
> Since:https://trac.cakephp.org/changeset/5231underscored variables
> passed in the set($one) format will be caramelized. This means:
>
> Controller->set(array('my_var' => 'my val'));
>
> Will not set your variable as $my_var in the view, but as $myVar! Not
> sure why this is the case, but keep it in mind when you use the 1
> parameter syntax : ).
>
> HTH,
> -- Felix
> --------------------------
> Blogger:http://www.thinkingphp.org/
> Entrepreneur:http://www.posttask.com//-- currently in private beta,
> ask me for invite / password/
> Freelancer:http://www.fg-webdesign.de/
>
> AIM: theundefined87
> Skype: TimeFor23
> Other IM: felixge.de <http://felixge.de/>
I should open a ticket to call the function 'caramelize'. Its <Cake>PHP after all, isn't it? : )Mmmm, caramelized variables :)
You can avoid this by passing anything as the second parameter, so:
AIM: | theundefined87 |
---|---|
Skype: | TimeFor23 |
Other IM: | felixge.de |
Mobile (USA): | +1 404 3888693 |
---|---|
Mobile (GER): | +49 162 9391612 |
Twitter: | http://twitter.com/felixge |