From: Nicolas Boisselier Date: Mon, 23 Jan 2017 14:05:00 +0000 (+0000) Subject: bug when db unknow X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=9d351d6791fe5913096c59a213491d9584e823b3;p=nb.git bug when db unknow --- 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'];