@@ -3425,7 +3425,7 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
3425
3425
$ defaultLabels = defaultLabels ($ resource ->id , $ containerName , type: 'service ' , subType: $ isDatabase ? 'database ' : 'application ' , subId: $ savedService ->id );
3426
3426
}
3427
3427
// Add COOLIFY_FQDN & COOLIFY_URL to environment
3428
- if (! $ isDatabase && $ fqdns? ->count() > 0 ) {
3428
+ if (! $ isDatabase && $ fqdns instanceof Collection && $ fqdns ->count () > 0 ) {
3429
3429
$ environment ->put ('COOLIFY_URL ' , $ fqdns ->implode (', ' ));
3430
3430
3431
3431
$ urls = $ fqdns ->map (function ($ fqdn ) {
@@ -3436,7 +3436,7 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
3436
3436
add_coolify_default_environment_variables ($ resource , $ environment , $ resource ->environment_variables );
3437
3437
3438
3438
$ serviceLabels = $ labels ->merge ($ defaultLabels );
3439
- if (! $ isDatabase && $ fqdns? ->count() > 0 ) {
3439
+ if (! $ isDatabase && $ fqdns instanceof Collection && $ fqdns ->count () > 0 ) {
3440
3440
if ($ isApplication ) {
3441
3441
$ shouldGenerateLabelsExactly = $ resource ->destination ->server ->settings ->generate_exact_labels ;
3442
3442
$ uuid = $ resource ->uuid ;
@@ -3667,7 +3667,9 @@ function convertComposeEnvironmentToArray($environment)
3667
3667
}
3668
3668
}
3669
3669
}
3670
- $ convertedServiceVariables ->put ($ key ->value (), $ value ?->value() ?? null );
3670
+ if ($ key ) {
3671
+ $ convertedServiceVariables ->put ($ key ->value (), $ value ?->value() ?? null );
3672
+ }
3671
3673
}
3672
3674
3673
3675
return $ convertedServiceVariables ;
0 commit comments