File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -3826,6 +3826,21 @@ function convertComposeEnvironmentToArray($environment)
3826
3826
{
3827
3827
$ convertedServiceVariables = collect ([]);
3828
3828
if (isAssociativeArray ($ environment )) {
3829
+ if ($ environment instanceof Collection) {
3830
+ $ changedEnvironment = collect ([]);
3831
+ $ environment ->each (function ($ value , $ key ) use ($ changedEnvironment ) {
3832
+ $ parts = explode ('= ' , $ value , 2 );
3833
+ if (count ($ parts ) === 2 ) {
3834
+ $ key = $ parts [0 ];
3835
+ $ realValue = $ parts [1 ] ?? '' ;
3836
+ $ changedEnvironment ->put ($ key , $ realValue );
3837
+ } else {
3838
+ $ changedEnvironment ->put ($ key , $ value );
3839
+ }
3840
+ });
3841
+
3842
+ return $ changedEnvironment ;
3843
+ }
3829
3844
$ convertedServiceVariables = $ environment ;
3830
3845
} else {
3831
3846
foreach ($ environment as $ value ) {
You can’t perform that action at this time.
0 commit comments