mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-07-19 03:23:11 -04:00
SQL allow recreating existing user (#2555)
* SQL allow recreating existing user Taking advantage of https://github.com/FreshRSS/FreshRSS/pull/2554 In a case when FreshRSS data is lost, but database data still intact (in particular MySQL or PostgreSQL), this patch allows recreating previous users without error * Better error retrieval Especially when error occur during the prepare statement
This commit is contained in:
committed by
GitHub
parent
1b15e22897
commit
be4c942cb3
@@ -27,7 +27,7 @@ class FreshRSS_UserDAO extends Minz_ModelPdo {
|
||||
if ($ok) {
|
||||
return true;
|
||||
} else {
|
||||
$info = empty($stm) ? array(2 => 'syntax error') : $stm->errorInfo();
|
||||
$info = empty($stm) ? $this->pdo->errorInfo() : $stm->errorInfo();
|
||||
Minz_Log::error(__METHOD__ . ' error: ' . $info[2]);
|
||||
return false;
|
||||
}
|
||||
@@ -45,7 +45,7 @@ class FreshRSS_UserDAO extends Minz_ModelPdo {
|
||||
if ($ok) {
|
||||
return true;
|
||||
} else {
|
||||
$info = $stm == null ? array(2 => 'syntax error') : $stm->errorInfo();
|
||||
$info = $stm == null ? $this->pdo->errorInfo() : $stm->errorInfo();
|
||||
Minz_Log::error(__METHOD__ . ' error: ' . $info[2]);
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user