You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
InputFileReaderTask: a null input raises a warning then a TypeError instead of an explicit exception #242
Warning: Undefined array key "filename"
TypeError: file_exists(): Argument #1 ($filename) must be of type string, null given
Expected: an explicit \UnexpectedValueException (e.g. No file path given as input, like InputFolderBrowserTask since #232).
Reproduced on main (ad31c1f), PHP 8.5, Symfony 8.1, by calling the task / transformer directly. Found while adding the missing tests of #197.
Cause
InputFileReaderTask::getOptions() only sets filename when the input is not null, and the filename option is removed from the resolver, so FileReaderTask::execute() reads an undefined key.
Proposed fix
Throw an \UnexpectedValueException when the input is not a non-empty string. Update input_file_reader_task.md, add tests.
Activity
Merge pull request #250 from cleverage/242