From ae26970075bbbe89d17e8069f27f33acc19dd6f3 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Sat, 3 Feb 2018 00:12:49 -0600 Subject: [PATCH] Bugfix: error message for current user is using incorrect/non-existent variable --- common/standard/classes/standard_index.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/common/standard/classes/standard_index.php b/common/standard/classes/standard_index.php index 299484f..e002fc3 100644 --- a/common/standard/classes/standard_index.php +++ b/common/standard/classes/standard_index.php @@ -545,7 +545,17 @@ class c_standard_index extends c_base_return { $this->session->set_user_current($user_current); } else { - $error = c_base_error::s_log(NULL, ['arguments' => [':{account_name}' => $last_error, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_ACCOUNT); + $account_name = $user_current->get_name_machine(); + if ($account_name instanceof c_base_return_string) { + $account_name = $account_name->get_value_exact(); + } + else { + $account_name = ''; + } + + $error = c_base_error::s_log(NULL, ['arguments' => [':{account_name}' => $account_name, ':{function_name}' => __CLASS__ . '->' . __FUNCTION__]], i_base_error_messages::POSTGRESQL_NO_ACCOUNT); + unset($account_name); + return c_base_return_error::s_false($error); } unset($user_current); -- 1.8.3.1