Fix variable assignment in Import.php and ApplicationDeploymentJob.php

This commit is contained in:
Andras Bacsai
2024-04-11 13:20:46 +02:00
parent 484a3dbe5c
commit e71032a8fc
11 changed files with 95 additions and 54 deletions

View File

@@ -114,8 +114,12 @@ class StartMysql
{
$local_persistent_volumes = [];
foreach ($this->database->persistentStorages as $persistentStorage) {
$volume_name = $persistentStorage->host_path ?? $persistentStorage->name;
$local_persistent_volumes[] = $volume_name . ':' . $persistentStorage->mount_path;
if ($persistentStorage->host_path !== '' && $persistentStorage->host_path !== null) {
$local_persistent_volumes[] = $persistentStorage->host_path . ':' . $persistentStorage->mount_path;
} else {
$volume_name = $persistentStorage->name;
$local_persistent_volumes[] = $volume_name . ':' . $persistentStorage->mount_path;
}
}
return $local_persistent_volumes;
}