Skip to content

Commit 4b5428a

Browse files
committed
#6 - Returning connection error before error
1 parent ec1fa4c commit 4b5428a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/TgDatabase/Database.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ public function insert_id() {
171171
* @return string error text
172172
*/
173173
public function error() {
174+
if ($this->con->connect_error) {
175+
return $this->con->connect_error;
176+
}
174177
return $this->con->error;
175178
}
176179

0 commit comments

Comments
 (0)