Closed
Description
Preconditions (*)
- Magento 2.4-develop
- Use the FTP connection by
Magento\Framework\Filesystem\Io\Ftp
Regarding to the PHP documentation ftp_nlist()
method can return as array and the false,
and in case of empty folder it returns false.
Need to add additional check for the (false) case ad not put result of ftp_nlist()
directly to the foreach loop
Steps to reproduce (*)
- Try to execute ls method of Magento\Framework\Filesystem\Io\Ftp::ls() on empty folder
Expected result (*)
- [Screenshots, logs or description]
2.. empty array returned
Actual result (*)
- [Screenshots, logs or description]
- Exception Returned
Invalid argument supplied for foreach() in vendor/magento/framework/Filesystem/Io/Ftp.php on line 319
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.4-develop branchGate 3 Passed. Manual verification of the issue completed. Issue is confirmedA defect with this priority could have functionality issues which are not to expectations.The issue has been reproduced on latest 2.4-develop branchAffects critical data or functionality and forces users to employ a workaround.Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Type
Projects
Status
Done