Steps
- Create an entity (Any entity, doesn't matter which one, Address, Barcode, Contact,etc)
- pass it through json_encode.
Expected behavior:
Returns a json encoded string of all the properties available in the entity
Actual behavior:
Throws an exception
What exactly is currentService being used for? Currently I can only see it being set, and not being read anywhere except to throw the mentioned exception. getCurrentService() does not seems to be used.
And why must it be set if it's not used anywhere?
If it is absolutely necessary to have, can the check be moved elsewhere so it doesn't interfere with the simple process of serializing the entity's properties?