Closed (fixed)
Project:
Migrate Extras
Version:
7.x-2.x-dev
Component:
Profile2
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Dec 2011 at 15:14 UTC
Updated:
25 Mar 2012 at 19:40 UTC
Problem: if you pass a stdClass Object to entity_save() some follow-up modules like Rules assume that they get a full object and invoke methods on it. This leads of course to a fatal error.
Call to undefined method stdClass::type() in modules/entity/includes/entity.property.inc
Here is a patch that uses either a newly created entity class or an existing loaded entity for saving. And I did a little code cleanup, removed totally useless lines.
| Comment | File | Size | Author |
|---|---|---|---|
| me-profile2-classes.patch | 2.3 KB | klausi |
Comments
Comment #1
mikeryanCan you explain a bit what is "totally useless" about the lines you're removing? Do you mean that they're now unnecessary due to the entity_create() call?
Thanks.
Comment #2
klausiSure:
"created": this has been added only recently to profile2, so this should probably stay.
"vid": property does not exist in profile2
"status": property does not exist in profile2
"language": property does not exist in profile2
"revision": property does not exist in profile2
Comment #3
mikeryanCommitted, thanks.