From 9d351d6791fe5913096c59a213491d9584e823b3 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Mon, 23 Jan 2017 14:05:00 +0000 Subject: [PATCH] bug when db unknow --- www/dbq/dbq.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/dbq/dbq.php b/www/dbq/dbq.php index 8c4825a4..b99ade49 100644 --- a/www/dbq/dbq.php +++ b/www/dbq/dbq.php @@ -195,13 +195,13 @@ class DbQ extends nb { # From conf if (!is_array($connect) and $connect === true - and isset($this->db->conf[$this->params['db']]) ) { + if (empty($this->db->conf[$this->params['db']])) + $this->not_found('Unknown database: '.$this->params['db']); $connect = $this->db->conf[$this->params['db']]; - if (empty($connect['name'])) $this->not_found('Unknown database: '.$this->params['db']); } - $connect['id']= $this->params['db']; + $connect['id'] = $this->params['db']; $this->db->__construct($connect); #$this->id = $this->params['db']; -- 2.47.3