- Issue created by @j-henriquez
- Status changed to Needs review
over 1 year ago 2:04am 3 March 2023 - πΊπΈUnited States tr Cascadia
So if I understand correctly, some code is passing a non-array to this function?
That is wrong. Rather adding all sorts of checks to the Entity API to make sure this is an array, why don't you fix the actual code that is doing the wrong thing?
I would be in favor of type hinting the parameter to ensure an array is passed, but I don't see the need to do a cast in the Entity API to coerce the input to be an array.
- π¦πΊAustralia j-henriquez
I was coming back to the issue to make this comment. I've changed the code so it parses an array to the function as it expects it.
Ideally, there should be an exception thrown by the load function, that the value being parsed through isn't an array.