diff options
| author | 2019-11-06 21:54:13 +0100 | |
|---|---|---|
| committer | 2019-11-06 21:54:13 +0100 | |
| commit | 91cb165829badde07c42a002215cf52779d891b6 (patch) | |
| tree | b8ee6e04e32dcf6c6fc25b7b0b9fe2952d2991ba /lib/Minz/ModelPdo.php | |
| parent | 3aa66f317b496ccd9a2df914bbc747c52081a7ad (diff) | |
| parent | 6d596e9e54308297d423b23bf65338d62eebc415 (diff) | |
Merge pull request #2633 from FreshRSS/dev1.15.1
FreshRSS 1.15.1
Diffstat (limited to 'lib/Minz/ModelPdo.php')
| -rw-r--r-- | lib/Minz/ModelPdo.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Minz/ModelPdo.php b/lib/Minz/ModelPdo.php index 69785c253..6eb4881dc 100644 --- a/lib/Minz/ModelPdo.php +++ b/lib/Minz/ModelPdo.php @@ -28,6 +28,9 @@ 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; @@ -84,7 +87,6 @@ class Minz_ModelPdo { 'Invalid database type!', $db['user'], Minz_Exception::ERROR ); - break; } self::$sharedPdo = $this->pdo; } catch (Exception $e) { |
