mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-14 07:28:41 +00:00
Fix invalid ftp login
This commit is contained in:
parent
e8bed84e6e
commit
b62d213000
|
|
@ -55,6 +55,10 @@ class Directory extends FileAbstract implements FtpContainerInterface, Directory
|
||||||
{
|
{
|
||||||
$con = \ftp_connect($http->getHost(), $http->getPort());
|
$con = \ftp_connect($http->getHost(), $http->getPort());
|
||||||
|
|
||||||
|
if ($con === false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
\ftp_login($con, $http->getUser(), $http->getPass());
|
\ftp_login($con, $http->getUser(), $http->getPass());
|
||||||
|
|
||||||
if ($http->getPath() !== '') {
|
if ($http->getPath() !== '') {
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,10 @@ class File extends FileAbstract implements FileInterface
|
||||||
{
|
{
|
||||||
$con = \ftp_connect($http->getHost(), $http->getPort());
|
$con = \ftp_connect($http->getHost(), $http->getPort());
|
||||||
|
|
||||||
|
if ($con === false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
\ftp_login($con, $http->getUser(), $http->getPass());
|
\ftp_login($con, $http->getUser(), $http->getPass());
|
||||||
|
|
||||||
if ($http->getPath() !== '') {
|
if ($http->getPath() !== '') {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user