When passing in a file path using taxonomy_csv_import(), _taxonomy_csv_import_input_preload() calls file_save_load() to try and load a file object.
file_save_load() checks $_FILES to see if there's an uploaded file, and if there isn't it returns NULL. Because we have passed in a path, $FILES isn't set so the import then fails.
The module needs a way to either load the file into $_FILES or an alternative method of generating the file object.
This might be possible with file_save_data() though it would mean loading the file into a string then saving it out again. Bit of a roundabout solution.
Comments
Comment #1
samhassell commentedHere's a patch which uses file_save_data() as outlined above.