- last update
over 1 year ago 15 pass - πΈπ°Slovakia poker10
Thanks for working on this!
The
if-else
condition works only with these two possible scenarios://if the total number of files entered is 1 then only one file is being processed if ($files_length == 1) {
else { //more than one video is being added as input so we must join them all
So even though the patch #3 is correct, I do not think it would be good to introduce possibility to evaluate the
$files_length
variable to zero. If we allow that, it would means that it will end up in theelse
branch supposed to work with array, but actually the$file
would be an empty string (or similar). It can cause unpredicted behavior.So I propose to change the fix from:
$files_length = is_array($file) || $file instanceof Countable ? count($file) : (int) (!empty($file));
to:
$files_length = is_array($file) || $file instanceof Countable ? count($file) : 1;
This will ensure that if the
$file
would be empty, it would be handled correctly in theif
branch, see:if (!preg_match('/\%([0-9]+)d/', $file) && strpos($file, '%d') === FALSE && !is_file($file)) { //input file not valid return $this->_raiseError('setInputFile_file_existence', array('file' => $file)); }
I am going to commit the modified version of the patch to fix the problem.
-
poker10 β
committed bc3528ff on 7.x-2.x authored by
chrisdesigns β
Issue #3039351 by chrisdesigns, poker10: Fatal error - 'object that...
-
poker10 β
committed bc3528ff on 7.x-2.x authored by
chrisdesigns β
- Status changed to Fixed
over 1 year ago 4:07pm 16 June 2023 Automatically closed - issue fixed for 2 weeks with no activity.