I'm using 1.3.0 Stable and encountered the same problem.
Not using 'echo' solved the strange output.
regards,
Bart
On Apr 16, 2:31 pm, Jeremy Burns <jeremybu...@me.com> wrote:
> Which version are you on? If it's 1.2.x, try:
> $session->flash(); // no echo
>
> If it's 1.3, you use echo.
>
> Jeremy Burns
> jeremybu...@me.com
> On 16 Apr 2010, at 00:36, kjetiltuft wrote:
>
>
>
>
>
> > Hi,
>
> > I am new to this fora. I have encounted a possible bug in the CakePHP
> > framework or possible made a odd mistake myself. Any way, every time I
> > send messages to the view through the Session->setFlash() method the
> > Session->flash() method output a "1" after the div elements. Like the
> > example below:
>
> > <div id="flashMessage" class="message">This is a message...</div>1
>
> > I thought in the begining that I had done something wrong, since I
> > tend to be a bit to fast (and also sloppy) on the keyboard. But after
> > been able to reproduce this error on different servers and with a
> > clean installation of CakePHP, I can not understand what I possible
> > can be doing wrong.
>
> > This is my controller code:
>
> > <?php
>
> > class PagesController extends AppController
> > {
> > var $uses = array();
>
> > function index() {
> > $this->Session->setFlash('This is a message...');
> > }
> > }
>
> > And my default.ctp code:
>
> > <?php echo $session->flash(); ?>
> > <?php echo $content_for_layout; ?>
>
> > As you can see my application has no functionality and the error
> > occurs anyway. By the way, I have tried to search for this bug in
> > Google but it is quite hard to find anything relevant when the
> > searching criteria is pretty much "1". ;)
>
> > Thanks in advance for any help
>
> > -Kjetil
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd 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+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
>
> Check out the new CakePHP Questions sitehttp://cakeqs.organd 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+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en
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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment