Skip to content

Commit

Permalink
Show proper error message on blank page if db connection failed
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyut0n committed Jan 3, 2020
1 parent c6ef500 commit 6513ae4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions includes/gameserver.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function get_db() {
# Create a database object
public function set_db_credentials( $ip, $port, $user, $pass, $schema ) {
$this->db = new MySQL( $user, $pass, $schema, $ip, intval($port), 'utf8' );
$this->db->connect_exception = TRUE;
}

# Execute query in gameserver database
Expand Down

0 comments on commit 6513ae4

Please sign in to comment.