diff options
author | Aleksander Machniak <alec@alec.pl> | 2013-05-07 13:51:23 +0200 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2013-05-07 13:51:23 +0200 |
commit | 2193f6a1301edcb62de6f0cf338acccdbf5ec2f1 (patch) | |
tree | 61ccde7d0088c2a5c7274ccdaa2e2fcd91104fed /plugins/password | |
parent | ef1d6525c2333794d954ccce33de1bcd533f85c8 (diff) |
Avoid unused local variables
Diffstat (limited to 'plugins/password')
-rw-r--r-- | plugins/password/drivers/directadmin.php | 1 | ||||
-rw-r--r-- | plugins/password/drivers/sql.php | 5 | ||||
-rw-r--r-- | plugins/password/drivers/xmail.php | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/plugins/password/drivers/directadmin.php b/plugins/password/drivers/directadmin.php index 8bf0dc613..44ecea406 100644 --- a/plugins/password/drivers/directadmin.php +++ b/plugins/password/drivers/directadmin.php @@ -297,7 +297,6 @@ class HTTPSocket { $status = socket_get_status($socket); $startTime = time(); $length = 0; - $prevSecond = 0; while ( !feof($socket) && !$status['timed_out'] ) { $chunk = fgets($socket,1024); diff --git a/plugins/password/drivers/sql.php b/plugins/password/drivers/sql.php index de9ea0a3f..7a51dfe44 100644 --- a/plugins/password/drivers/sql.php +++ b/plugins/password/drivers/sql.php @@ -34,8 +34,9 @@ class rcube_sql_password $db = $rcmail->get_dbh(); } - if ($err = $db->is_error()) + if ($db->is_error()) { return PASSWORD_ERROR; + } // crypted password if (strpos($sql, '%c') !== FALSE) { @@ -184,7 +185,7 @@ class rcube_sql_password if (!$db->is_error()) { if (strtolower(substr(trim($sql),0,6)) == 'select') { - if ($result = $db->fetch_array($res)) + if ($db->fetch_array($res)) return PASSWORD_SUCCESS; } else { // This is the good case: 1 row updated diff --git a/plugins/password/drivers/xmail.php b/plugins/password/drivers/xmail.php index 37abc3001..59e467c5b 100644 --- a/plugins/password/drivers/xmail.php +++ b/plugins/password/drivers/xmail.php @@ -67,7 +67,7 @@ class XMail { function send($msg) { socket_write($this->socket,$msg); - if (substr($in = socket_read($this->socket, 512, PHP_BINARY_READ),0,1) != "+") { + if (substr(socket_read($this->socket, 512, PHP_BINARY_READ),0,1) != "+") { return false; } return true; @@ -85,7 +85,7 @@ class XMail { return false; } - if (substr($in = socket_read($this->socket, 512, PHP_BINARY_READ),0,1) != "+") { + if (substr(socket_read($this->socket, 512, PHP_BINARY_READ),0,1) != "+") { socket_close($this->socket); return false; } |