CakePHP会话变量成为别的东西

I'm having a problem with CakePHP session. I already set the session like the following.

$this->Session->write('ProjectID',6);

but then when I use the following code to read the value, it become something else.In my case, it become 'img'.

$this->Session->read('ProjectID');

I've try to work with Google on this issue but no one seems to have same problem as I am.

Try to check if the Session was not destroyed or the key was removed before you read it. And it is highly recommended that you check if the key really exists before each read, and to use the cakephp dot notation like this:

if($this->Session->check('Project.id')) {
    $this->Session->read('Project.id');
}