aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/ModelPdo.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-11-12 10:19:57 +0100
committerGravatar GitHub <noreply@github.com> 2019-11-12 10:19:57 +0100
commit09c088c62ece3b17615fb4e2addfa16663bb334f (patch)
tree9fe5a64e52711524bd6c327cd9db02dca83065a5 /lib/Minz/ModelPdo.php
parent91cb165829badde07c42a002215cf52779d891b6 (diff)
parent874fce6656ce0a4fb144af672e8a31f1ec5f64f5 (diff)
Merge pull request #2655 from FreshRSS/dev1.15.2
FreshRSS 1.15.2
Diffstat (limited to 'lib/Minz/ModelPdo.php')
-rw-r--r--lib/Minz/ModelPdo.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Minz/ModelPdo.php b/lib/Minz/ModelPdo.php
index 6eb4881dc..ed88d58d1 100644
--- a/lib/Minz/ModelPdo.php
+++ b/lib/Minz/ModelPdo.php
@@ -28,13 +28,13 @@ class Minz_ModelPdo {
if ($currentUser === null) {
$currentUser = Minz_Session::param('currentUser');
}
- if ($currentUser == '') {
- throw new Minz_PDOConnectionException('Current user must not be empty!', '', Minz_Exception::ERROR);
- }
if ($currentPdo != null) {
$this->pdo = $currentPdo;
return;
}
+ if ($currentUser == '') {
+ throw new Minz_PDOConnectionException('Current user must not be empty!', '', Minz_Exception::ERROR);
+ }
if (self::$usesSharedPdo && self::$sharedPdo != null &&
($currentUser == '' || $currentUser === self::$sharedCurrentUser)) {
$this->pdo = self::$sharedPdo;