From 152975d05c23189dc3ef831bb6da614d1de7fe0e Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Sat, 10 Feb 2018 21:08:35 +0000 Subject: [PATCH] move to use db_assoc() rather than db_array() (code assumes assoc. array) --- model/PFAHandler.php | 4 ++-- model/VacationHandler.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/model/PFAHandler.php b/model/PFAHandler.php index f696ef0c..13ca99b5 100644 --- a/model/PFAHandler.php +++ b/model/PFAHandler.php @@ -808,7 +808,7 @@ abstract class PFAHandler { $result = db_query($query); if ($result['rows'] == 1) { - $row = db_array($result['result']); + $row = db_assoc($result['result']); $crypt_password = pacrypt($password, $row['password']); if ($row['password'] == $crypt_password) { @@ -853,7 +853,7 @@ abstract class PFAHandler { $result = db_query($query); if ($result['rows'] == 1) { - $row = db_array($result['result']); + $row = db_assoc($result['result']); $crypt_token = pacrypt($token, $row['token']); if ($row['token'] == $crypt_token) { diff --git a/model/VacationHandler.php b/model/VacationHandler.php index d131745c..4500fc93 100644 --- a/model/VacationHandler.php +++ b/model/VacationHandler.php @@ -149,7 +149,7 @@ class VacationHandler extends PFAHandler { return false; } - $row = db_array($result['result']); + $row = db_assoc($result['result']); $boolean = ($row['active'] == db_get_boolean(true)); # TODO: only return true and store the db result array in $this->whatever for consistency with the other classes return array(