Aditya P Bhatt
Aditya P Bhatt

Reputation: 22071

cakephp displays 1 with every flash message

I'm using cakephp and whenever there comes a session based flash message, there comes "1" after every error/success message, why?

It is related with "echo" before this flashmessage, so any idea, which file to make correction for it? We're using cakephp 1.2 version - FYI

Earliest reply would be appreciated.

Thanks !

Upvotes: 1

Views: 599

Answers (2)

Leo
Leo

Reputation: 1529

Long shot but you haven't done some thing like this

$this->Session->setFlash(__( $this->FileHandler->errorMessage . true),'flash_error')

In the INCORRECT example above the __() internationalizations method should take two arguments. You haven't accidentally concatenated boolean true on the end?

Upvotes: 0

JohnP
JohnP

Reputation: 50019

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

Upvotes: 2

Related Questions