Fix database name overriding to prevent intaleq-ridesDB crash on server
This commit is contained in:
@@ -53,6 +53,12 @@ class Database
|
|||||||
$cfg = self::$map[$name];
|
$cfg = self::$map[$name];
|
||||||
|
|
||||||
$dbname = getenv($cfg['name']);
|
$dbname = getenv($cfg['name']);
|
||||||
|
|
||||||
|
// 🔥 OVERRIDE: Prevent crash if .env on server still has the old wrong name
|
||||||
|
if ($name === 'ride' && $dbname === 'intaleq-ridesDB') {
|
||||||
|
$dbname = 'rideDB';
|
||||||
|
}
|
||||||
|
|
||||||
$host = getenv($cfg['host']) ?: 'localhost';
|
$host = getenv($cfg['host']) ?: 'localhost';
|
||||||
$user = getenv($cfg['user']);
|
$user = getenv($cfg['user']);
|
||||||
$pass = getenv($cfg['pass']);
|
$pass = getenv($cfg['pass']);
|
||||||
|
|||||||
Reference in New Issue
Block a user