Skip to content

Commit a7efc3d

Browse files
committed
fixes
1 parent 3a31c40 commit a7efc3d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/DB.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function __construct($host = '', $database = '', $username = '', $passwor
8383

8484
parent::__construct($dsn, $username, $password, $options);
8585
} catch (\PDOException $e) {
86-
$this->_error = $e->getMessage();
86+
throw new \PDOException($e->getMessage(), (int)$e->getCode());
8787
}
8888
}
8989

src/Model.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public static function instance($arg1, $arg2 = null) {
9191
}
9292

9393
public static function connect($host, $database, $username, $password) {
94-
$db = new \Models\DB(DB_HOST, DB_NAME, DB_USER, DB_PASSWORD);
94+
$db = new \Models\DB($host, $database, $username, $password);
9595
self::set_db($db);
9696
}
9797

0 commit comments

Comments
 (0)