You know the drill, Updates

This commit is contained in:
2023-05-01 19:51:20 -07:00
parent af6f76fbcb
commit 006e3d3314
105 changed files with 1725 additions and 1430 deletions

View File

@ -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();
}
/**