[ticket/12993] Return an array instead of reference passing

PHPBB3-12993