From a8ccb60c4fdd22a1f95bd3d33caea705bda9112b Mon Sep 17 00:00:00 2001 From: powerpbx Date: Tue, 9 May 2017 19:21:12 -0700 Subject: [PATCH] Fix SQL syntax (#2570) --- core/install/resources/classes/install_fusionpbx.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/install/resources/classes/install_fusionpbx.php b/core/install/resources/classes/install_fusionpbx.php index 3563ba4396..d7a88f0e0b 100644 --- a/core/install/resources/classes/install_fusionpbx.php +++ b/core/install/resources/classes/install_fusionpbx.php @@ -659,7 +659,7 @@ include "root.php"; $this->write_progress("... superuser exists as '" . $this->admin_uuid . "', updating password"); $sql = "update v_users "; $sql .= "set password = '".md5($salt.$this->admin_password)."' "; - $sql .= "set salt = '$salt' "; + $sql .= ",salt = '$salt' "; $sql .= "where USER_uuid = '".$this->admin_uuid."' "; $this->write_debug($sql); $this->dbh->exec(check_sql($sql)); @@ -712,7 +712,7 @@ include "root.php"; $prep_statement = $this->dbh->prepare(check_sql($sql)); $prep_statement->execute(); $row = $prep_statement->fetch(PDO::FETCH_ASSOC); - if ($row['count'] == 0) { + if ($row['count(*)'] == 0) { $sql = "insert into v_contacts "; $sql .= "("; $sql .= "domain_uuid, "; @@ -742,7 +742,7 @@ include "root.php"; $prep_statement = $this->dbh->prepare(check_sql($sql)); $prep_statement->execute(); $row = $prep_statement->fetch(PDO::FETCH_ASSOC); - if ($row['count'] == 0) { + if ($row['count(*)'] == 0) { //add the user to the superadmin group $sql = "insert into v_group_users "; $sql .= "(";