Closed (fixed)
Project:
Entity API
Version:
7.x-1.x-dev
Component:
Entity property wrapper
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
31 Jan 2014 at 23:12 UTC
Updated:
3 Apr 2014 at 17:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
drummThe attached patch works around the issue.
Comment #2
drummComment #3
klausiThis is not really the fault of RESTWS, the entityAccess() method of EntityDrupalWrapper invokes entity_access() with $entity as FALSE, which is not supported by the API. Either $entity is an object or NULL, but not FALSE. isset(FALSE) will return TRUE, so the access callback thinks it deals with an object, which results in the notice.
Patch attached to fix entityAccess().
TODO: test case, any volunteers?
Comment #4
drummComment #5
drumm#3 looks good in my testing.
Comment #6
yesct commentedComment #7
drumm3: entity-access-notice-2186603-3.patch queued for re-testing.
Comment #8
yesct commented@fago do you want tests for this?
Comment #9
fagoGood catch, thanks committed.
@tests: I'd appreciate it, though imo it should not block the fix as tests do not cover any edge case yet anyway. But of course I'd highly appreciate test coverage to make sure it doesn't break again!