IO SFTP - wrong constants in write method #9016
Labels
bug report
Issue: Format is valid
Gate 1 Passed. Automatic verification of issue format passed
Issue: Ready for Work
Gate 4. Acknowledged. Issue is added to backlog and ready for development
Preconditions
Magento 2.1.5
Steps to reproduce
File upload via SFTP to remote Server
Expected result
File upload works
Actual result
Exception thrown:
Notice: Use of undefined constant NET_SFTP_LOCAL_FILE - assumed 'NET_SFTP_LOCAL_FILE' in
.../magento/vendor/magento/framework/Filesystem/Io/Sftp.php on line 187
Wrong code: $mode = is_readable($source) ? NET_SFTP_LOCAL_FILE : NET_SFTP_STRING;
Should be: $mode = is_readable($source) ? \phpseclib\Net\SFTP::SOURCE_LOCAL_FILE : \phpseclib\Net\SFTP::SOURCE_STRING;
The text was updated successfully, but these errors were encountered: