YES.  I had this exact same problem.  Drove me nuts.  $session-
>flash() outputs the message directly and returns true/false.  In your
view you probably have something like echo $this->flash(), so the
message is getting written and then the return gets written.



On Jul 24, 3:04 am, lgarcia <[EMAIL PROTECTED]> wrote:
> I have this message function to show flash messages and it returns me
> a "1" after any message is showed... anyone knows why?
>
> <code>
>         function _message($message, $url = false, $value = false, $error =
> false)
>         {
>                 if ($value) {
>                         $message = sprintf($message, '<strong>' . $value . 
> '</strong>');
>                 }
>                 if ($error) {
>                         $message = '<div class="fmessage error">' . $message 
> . '</div>';
>                 } else {
>                         $message = '<div class="fmessage confirmation">' . 
> $message . '</
> div>';
>                 }
>                 $this->Session->setFlash($message, '');
>                 if ($url) {
>                         $this->redirect($url);
>                 }
>         }
> </code>
>
> Regards


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

Reply via email to