entity_entity_property_info() doesn't fully prevent a deleted class from reaching line 23 in entity.info.inc. I suggest using class_exists($info['metadata controller class']) in the IF statement

Comments

turingfan’s picture

Component: Entity CRUD controller » Entity property wrapper
fago’s picture

Version: 7.x-1.0-beta10 » 7.x-1.x-dev
Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

Why should the class be deleted, but the code still there? Is there a valid case this may happen?

turingfan’s picture

Yes I'm sure there's a valid case for this because it broke my site after I disabled a module while having entity cache turned on. When I added the class_exists() condition to If statement, the problem went away. This case might be prevented from passing a false class beforehand or you can blame it on the entity cache module, I'm not a project contributor though (still a virgin to the open-source community), I just needed it fixed ASAP. I hope this helps. Cheers!

fago’s picture

I don't think it can be caused by entity-cache. entity-info is cached by core. What was the module you deactivated? Is it reproducable?

socialnicheguru’s picture

bojanz’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (outdated)