problem with the latest 1.1.11.4064
Hi All, I have upgraded to the latest version, I have been adding the loadModel in components and everything works fine except for one thing : - I use to have methods in controller that I called using an ajax link url and I pass paratemers in a pretty form : link('/Controller/action/0/1/' .. for example .. and in my controller I use to have : function action($arg1, $arg2) { } This was working fine until I upgraded. It appears that the arguments are not passed anymore in the same way, specially if one of them is 0 it seems to be dropped. Of course I then get missing argument 2 in the controller during the call .. Pretty anonying stuff, I will switch back to the previous version untill I modify all or maybe it's an error ? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: problem with the latest 1.1.11.4064
you should always set a default value to avoid the missing argument, like function action($arg1=null, $arg2=null) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: problem with the latest 1.1.11.4064
yes but this does not help at all, because the 0 are dropped so you will end up with your first argument taking the value of the second and the second be null ... I found the problem, in the new version of router.php, the neatarray-cleanup has been remove and replace by array_filter. The problem is that array_filter wihtout call back function will drop everything that is NULL, and then 0 becomes null and is dropped.. I have corrected, a dirty fast solution, by writing my callback function to verify that 0 is not dropped ..and this works.. Maybe a ticket would be needed ? Thanks On Dec 5, 1:10 pm, Claudio Poli [EMAIL PROTECTED] wrote: you should always set a default value to avoid the missing argument, like function action($arg1=null, $arg2=null) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: problem with the latest 1.1.11.4064
Please report this to the trac. Thanks! -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de francky06l Enviado el: Martes, 05 de Diciembre de 2006 09:30 a.m. Para: Cake PHP Asunto: Re: problem with the latest 1.1.11.4064 I found the problem, in the new version of router.php, the neatarray-cleanup has been remove and replace by array_filter. The problem is that array_filter wihtout call back function will drop everything that is NULL, and then 0 becomes null and is dropped.. I have corrected, a dirty fast solution, by writing my callback function to verify that 0 is not dropped ..and this works.. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---