From f1d1d46651140961d6dc9436b3b9c66a2723f896 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 8 Nov 2019 23:11:35 +0100 Subject: Fix CLI bug regarding an empty user (#2646) Fix https://github.com/FreshRSS/FreshRSS/issues/2644 --- lib/Minz/ModelPdo.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Minz') 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; -- cgit v1.2.3