캐시가 없는 상황에서 DB 연결 에러시 DB 에러 메세지 대신 php 치명적 에러가 나오는 문제 수정

(라이믹스 오류 화면 출력시에도 DB 연결이 사용되므로 Debug::displayErrorScreen() 함수를 거치면 치명적 에러가 발생되기에 Exception로 처리하지 않았음)
라이믹스가 설치되지 않은 상태에서는 "에러 로그로 확인하라는 메세지" 없이 에러가 바로 출력되도록 수정
This commit is contained in:
conory 2019-01-17 18:26:46 +09:00
parent 843e16f983
commit c2221a25e6
3 changed files with 31 additions and 18 deletions

View file

@ -73,16 +73,16 @@ class DBMySQL extends DB
// Check connection error
if($mysqli->connect_errno)
{
$this->setError($mysqli->connect_errno, $mysqli->connect_error);
return;
Rhymix\Framework\Debug::displayError(sprintf('DB ERROR %d : %s', $mysqli->connect_errno, $mysqli->connect_error));
exit;
}
// Check DB version
$this->db_version = $mysqli->server_info;
if (version_compare($this->db_version, '5.0.7', '<'))
{
$this->setError(-1, 'Rhymix requires MySQL 5.0.7 or later. Current MySQL version is ' . $this->db_version);
return;
Rhymix\Framework\Debug::displayError('Rhymix requires MySQL 5.0.7 or later. Current MySQL version is ' . $this->db_version);
exit;
}
// Set DB charset