You know the drill, Updates
This commit is contained in:
@ -157,16 +157,18 @@ class YDB extends ExtendedPdo {
|
||||
*/
|
||||
public function dead_or_error(\Exception $exception) {
|
||||
// Use any /user/db_error.php file
|
||||
if( file_exists( YOURLS_USERDIR . '/db_error.php' ) ) {
|
||||
include_once( YOURLS_USERDIR . '/db_error.php' );
|
||||
die();
|
||||
$file = YOURLS_USERDIR . '/db_error.php';
|
||||
if(file_exists($file)) {
|
||||
if(yourls_include_file_sandbox( $file ) === true) {
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
$message = yourls__( 'Incorrect DB config, or could not connect to DB' );
|
||||
$message .= '<br/>' . get_class($exception) .': ' . $exception->getMessage();
|
||||
|
||||
yourls_die( yourls__( $message ), yourls__( 'Fatal error' ), 503 );
|
||||
die();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user