@jameshalsall The previous code would throw an error if $data was not an array, should this be maintained?