getData() always needs to return an array, backport of #6988