Prevent errors when path is an array and not a string in DeleteFileJob
In several projects we had strange errors in the file-deletion job. It appears that the path sometimes is an array.
This MR by @romy makes sure that the path is taken from the array in this case.
Without this patch the file deletion does not work and the error log is filled with:
PHP Fatal error: Uncaught TypeError: file_exists(): Argument #1 ($filename) must be of type string, array given in .../wordpress/wp-content/plugins/caldera-forms/cf2/Jobs/DeleteFileJob.php:45
Stack trace:
#0 .../wordpress/wp-content/plugins/caldera-forms/cf2/Jobs/DeleteFileJob.php(45): file_exists(Array)