Closed (fixed)
Project:
JSON:API Extras
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 May 2017 at 20:50 UTC
Updated:
31 May 2017 at 21:15 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
damienmckennaNever mind, I hadn't implemented all of the methods.
Comment #3
damienmckennaYes, this is a bug after all :p
Comment #4
damienmckennaHere's a FieldEnhancer that demonstrates the bug.
As you can see the FieldEnhancer has all of the required methods, but when you try to output something using it the error is thrown.
Comment #5
damienmckennaThis is what the config looks like on a field which uses the FieldEnhancer:
Comment #6
damienmckennaThis should fix the problem.
What was happening was that it wasn't checking what the $settings were before passing them into createInstance(), which is where it needed an array. This starts with an array and only uses the passed in settings if they're an array.
Comment #8
e0ipsoMany thanks @DamienMcKenna!