It actually doesn't error :) (which is why I guess it was written this way in the phpp_functional_test).

In the case of an array, lang_path simply won't exist, so it won't no include will be attempted, and an empty array would be merged in to the existing lang array.

This is an exact copy of the function used in the main phpbb functional test case, only difference being the $lang_path here points to the extensions language files instead of phpBB's language files.