Search code examples
zend-frameworkdoctrinedoctrine-ormmamp

How to port Zend+Doctrine2 from Wamp To Mamp


I have a little app for myself on my windows machine which i want to put on my mac at work.

Both are php5.3.2 (doctrine using arraycache). On the mac via terminal i updated the schema, cleared cache and regenerated proxies.

But, it gives me these error notices:

Notice: Unknown: "id" returned as member variable from __sleep() but does not exist in Unknown on line 0

( ! ) Notice: Unknown: "created" returned as member variable from __sleep() but does not exist in Unknown on line 0

( ! ) Notice: Unknown: "modified" returned as member variable from __sleep() but does not exist in Unknown on line 0

( ! ) Notice: Unknown: "name" returned as member variable from __sleep() but does not exist in Unknown on line 0

And so on for every member of the object in my view. I found this sleep notice very unfamiliar... any clue as to why this is happening?


Solution

  • Your entity is being serialized. If you're storing it in session, this happens transparently, otherwise it could be somewhere in your code. See the documentation about serialization of Doctrine 2 entities, and some pitfalls: http://www.doctrine-project.org/docs/orm/2.0/en/reference/architecture.html#serializing-entities

    You'd need to post some code to see where, or why this is happening, but the underlying reason is the serialization.