Permalink
Browse files

connection error handling #448

  • Loading branch information...
EdwardBock committed Sep 6, 2018
1 parent b98d936 commit 8e60ba0563e782d6fd0296271d9da6bbb641b050
Showing with 4 additions and 0 deletions.
  1. +4 −0 classes/grid_db.php
View
@@ -34,6 +34,10 @@ public function __construct($host,$user,$password,$database,$author="UNKNOWN",$p
}
$this->connection=new mysqli($host,$user,$password,$database, $port);
if($this->connection->connect_errno){
error_log("Grid: ".$this->connection->connect_error, 4);
die("Grid could not connect to database.");
}
$this->connection->set_charset("utf8");
$this->author=$author;
$this->ajaxEndpoint=new grid_ajaxendpoint();

0 comments on commit 8e60ba0

Please sign in to comment.