0
votes

When I call $session->flash() in the view, the flash message does get displayed, however it also displays a number, usually 1, afterward it. See the html produced:

<div id="authMessage" class="flash flash_error">Passwords do not match</div>1

What is this, why does it now always happen, and how do I get rid of it?

2
Are you passing a layout as a parameter? What happens if you debug($_SESSION) - does that show the value you expect or the number? - brettkelly

2 Answers

5
votes

I guess you're doing this, right?

echo $session->flash();

You don't need to echo the flash(), it'll output by itself. What's happening is that flash() outputs the message and returns true, and you're echoing that true, which gets turned into '1'.

0
votes

Just remove the echo in front of your flash call $session->flash(); in default.ctp, that should do it