summaryrefslogtreecommitdiff
path: root/plugins/password/drivers/sql.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/password/drivers/sql.php')
-rw-r--r--plugins/password/drivers/sql.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/password/drivers/sql.php b/plugins/password/drivers/sql.php
index e02bff146..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) {
@@ -183,8 +184,8 @@ class rcube_sql_password
$res = $db->query($sql, $sql_vars);
if (!$db->is_error()) {
- if (strtolower(substr(trim($query),0,6))=='select') {
- if ($result = $db->fetch_array($res))
+ if (strtolower(substr(trim($sql),0,6)) == 'select') {
+ if ($db->fetch_array($res))
return PASSWORD_SUCCESS;
} else {
// This is the good case: 1 row updated