Fix Illegal string offset 'function' on morphToMany
Merge pull request #3564 from Ruby184/fix/illegal-string-offset

Fix Illegal string offset 'function' on morphToMany