I think that exists a bug in the funcion $html->dateTimeOptionTag(),
when I try to show a combo box usign this funtion and passing the value
that I want to be selected by the function I always obtain a combo box
without  the date value that I pass to the funcion selected.

I think that the error is in the lines 01195 to 01197 of
cake\libs\view\helpers\html.php file.
........

01195                         if (strpos($selected, ' ') === false) {
01196                                 $selected = '0000-00-00 ' .
$selected;
01197                         }
01198                         $date = explode('-', $selected);
01199                         $days = explode(' ', $date[2]);
01200
01201                         $day = $days[0];
01202                         $month = $date[1];
01203                         $year = $date[0];
.......

The "IF" in the line 01195 always evaluates to false when we pass only
a date value, if we pass a string containting '2006-04-04 when we reach
this part of the code the "if block" change the value of my string to
'0000-00-00 2006-04-04' after that point when we try to use the
explodes they arenĀ“t going to work because the string is now
corrupted.

In the cake version 1.x.x.2819 the code in the lines 01195 to 01197
doesn't exist that code appears in the cake version 1.1.5.3148. If we
comment from the line 01195 to 01197 the function seems to work fine.
What do you think about this, is this a bug?

Sorry about my english I'm not a native speaker..


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to