* [FIX] Avoid long database hostname.

Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
Rubén D
2022-03-13 20:21:07 +01:00
parent ec47a5ab83
commit a436fb2b3f

View File

@@ -56,8 +56,8 @@ class DatabaseUtil
$conn = self::getConnection();
$conn->exec(sprintf($query, $database, $user, SELF_IP_ADDRESS, $pass));
// Long hostname returned on Travis CI
if (getenv('TRAVIS') === false) {
// Long hostname returned on CI/CD tests
if (strlen(SELF_HOSTNAME) < 60) {
$conn->exec(sprintf($query, $database, $user, SELF_HOSTNAME, $pass));
}