@@ -29,14 +29,18 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | public function init($connect_options) { |
| 31 | 31 | extract($connect_options); |
| 32 | - if (isset($db_name)) |
|
| 33 | - $this->db_name = $db_name; |
|
| 34 | - if (isset($encoding)) |
|
| 35 | - $this->encoding = $encoding; |
|
| 36 | - if (isset($table_prefix)) |
|
| 37 | - $this->table_prefix = $table_prefix; |
|
| 38 | - if (isset($noConnectAbort)) |
|
| 39 | - $this->noConnectAbort = $noConnectAbort; |
|
| 32 | + if (isset($db_name)) { |
|
| 33 | + $this->db_name = $db_name; |
|
| 34 | + } |
|
| 35 | + if (isset($encoding)) { |
|
| 36 | + $this->encoding = $encoding; |
|
| 37 | + } |
|
| 38 | + if (isset($table_prefix)) { |
|
| 39 | + $this->table_prefix = $table_prefix; |
|
| 40 | + } |
|
| 41 | + if (isset($noConnectAbort)) { |
|
| 42 | + $this->noConnectAbort = $noConnectAbort; |
|
| 43 | + } |
|
| 40 | 44 | |
| 41 | 45 | $dsn = "mysql:host=$host;port=$port;dbname=$db_name;charset=$encoding"; |
| 42 | 46 | $dt = new \DateTime(); |