Skip to content

Commit

Permalink
php 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
alikon committed Apr 28, 2023
1 parent a950b53 commit 9121903
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions libraries/src/Client/FtpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public function __construct(array $options = [])
*/
public function __destruct()
{
if (\is_resource($this->_conn)) {
if ($this->_conn !== false) {
$this->quit();
}
}
Expand Down Expand Up @@ -293,7 +293,7 @@ public function connect($host = '127.0.0.1', $port = 21)
$err = null;

// If already connected, return
if (\is_resource($this->_conn)) {
if ($this->_conn !== false) {
return true;
}

Expand Down Expand Up @@ -344,7 +344,7 @@ public function connect($host = '127.0.0.1', $port = 21)
*/
public function isConnected()
{
return \is_resource($this->_conn);
return ($this->_conn !== false);
}

/**
Expand Down Expand Up @@ -1580,7 +1580,7 @@ public function listDetails($path = null, $type = 'all')
protected function _putCmd($cmd, $expectedResponse)
{
// Make sure we have a connection to the server
if (!\is_resource($this->_conn)) {
if ($this->_conn === false) {
Log::add(Text::sprintf('JLIB_CLIENT_ERROR_FTP_PUTCMD_UNCONNECTED', __METHOD__), Log::WARNING, 'jerror');

return false;
Expand Down Expand Up @@ -1659,7 +1659,7 @@ protected function _passive()
$err = null;

// Make sure we have a connection to the server
if (!\is_resource($this->_conn)) {
if ($this->_conn === false) {
Log::add(Text::sprintf('JLIB_CLIENT_ERROR_FTP_NO_CONNECT', __METHOD__), Log::WARNING, 'jerror');

return false;
Expand Down

0 comments on commit 9121903

Please sign in to comment.