return empty array vs false to avoid type error - ai assisted

Closes #3584954 The solution was provided by Cursor but validated and tested by myself.

Merge request reports

Loading