Closed (fixed)
Project:
Entity API
Version:
7.x-1.0-beta8
Component:
Entity property wrapper
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Apr 2011 at 22:14 UTC
Updated:
16 May 2011 at 11:01 UTC
If you try to instantiate a EntityDrupalWrapper object without pass the $info array an Unsupported operand types error occurred.
Steps to repeat:
$wrapper = new EntityDrupalWrapper('node');
Expected Results:
Instantiate the object
Actual Results:
PHP Fatal error: Unsupported operand types in .../sites/all/modules/entity/includes/entity.wrapper.inc on line 33
In attachment a patch.
| Comment | File | Size | Author |
|---|---|---|---|
| entity.wrapper.inc_.patch | 1.02 KB | lucor |
Comments
Comment #1
fagothanks, the references are indeed left-over and not needed any more - that did not fix the problem though. The problem was wrong default for $info being NULL instead of array(). I fixed both by aligning all constructors to the function signature of entity_metadata_wrapper(). Anyway, using the factory function entity_metadata_wrapper() is the preferred way to instantiating wrapper objects.