From 142682cfd38d838ed6582a8409b3cd423b09f158 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Fri, 2 Sep 2016 08:12:20 -0400 Subject: [PATCH] Added isset check to avoid errors. --- module/VuFind/src/VuFind/Db/Row/User.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/module/VuFind/src/VuFind/Db/Row/User.php b/module/VuFind/src/VuFind/Db/Row/User.php index 4d8cefe9103..d72c030e31a 100644 --- a/module/VuFind/src/VuFind/Db/Row/User.php +++ b/module/VuFind/src/VuFind/Db/Row/User.php @@ -140,9 +140,11 @@ class User extends RowGateway implements \VuFind\Db\Table\DbTableAwareInterface, */ public function getCatPassword() { - return $this->passwordEncryptionEnabled() - ? $this->encryptOrDecrypt($this->cat_pass_enc, false) - : (isset($this->cat_password) ? $this->cat_password : null); + if ($this->passwordEncryptionEnabled()) { + return isset($this->cat_pass_enc) + ? $this->encryptOrDecrypt($this->cat_pass_enc, false) : null; + } + return isset($this->cat_password) ? $this->cat_password : null; } /** -- GitLab