aboutsummaryrefslogtreecommitdiff
path: root/app/Models/UserDAO.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2021-12-02 23:30:13 +0100
committerGravatar GitHub <noreply@github.com> 2021-12-02 23:30:13 +0100
commit00dbde68fbaf7da68ccf191c33f2de88d3603aa8 (patch)
tree26b182e58df9adc8ff0210bda5bb4b03d28571a1 /app/Models/UserDAO.php
parenta2ab9cf83aaead96497a70a1430ce0424c0d8316 (diff)
Fix some PHPstan errors (#4019)
Fix some wrong variables found by https://github.com/FreshRSS/FreshRSS/issues/4016
Diffstat (limited to 'app/Models/UserDAO.php')
-rw-r--r--app/Models/UserDAO.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Models/UserDAO.php b/app/Models/UserDAO.php
index 266c8bc0e..1596fa5cc 100644
--- a/app/Models/UserDAO.php
+++ b/app/Models/UserDAO.php
@@ -14,7 +14,7 @@ class FreshRSS_UserDAO extends Minz_ModelPdo {
if ($ok) {
return true;
} else {
- $info = empty($stm) ? $this->pdo->errorInfo() : $stm->errorInfo();
+ $info = $this->pdo->errorInfo();
Minz_Log::error(__METHOD__ . ' error: ' . json_encode($info));
return false;
}
@@ -31,8 +31,8 @@ class FreshRSS_UserDAO extends Minz_ModelPdo {
if ($ok) {
return true;
} else {
- $info = $stm == null ? $this->pdo->errorInfo() : $stm->errorInfo();
- Minz_Log::error(__METHOD__ . ' error: ' . $info[2]);
+ $info = $this->pdo->errorInfo();
+ Minz_Log::error(__METHOD__ . ' error: ' . json_encode($info));
return false;
}
}