diff --git a/src/Appwrite/Docker/Env.php b/src/Appwrite/Docker/Env.php index 19979eb0ce..bce12a95e6 100644 --- a/src/Appwrite/Docker/Env.php +++ b/src/Appwrite/Docker/Env.php @@ -19,7 +19,7 @@ class Env $data = explode("\n", $data); foreach ($data as &$row) { - $row = explode('=', $row); + $row = explode('=', $row, 2); $key = (isset($row[0])) ? trim($row[0]) : null; $value = (isset($row[1])) ? trim($row[1]) : null; diff --git a/tests/resources/docker/.env b/tests/resources/docker/.env index 1c1359f0fe..b619ab8915 100644 --- a/tests/resources/docker/.env +++ b/tests/resources/docker/.env @@ -1,3 +1,4 @@ _APP_X=value1 _APP_Y=value2 -_APP_Z = value3 \ No newline at end of file +_APP_Z = value3 +_APP_W = value5= diff --git a/tests/unit/Docker/EnvTest.php b/tests/unit/Docker/EnvTest.php index f085d62e56..6730491438 100644 --- a/tests/unit/Docker/EnvTest.php +++ b/tests/unit/Docker/EnvTest.php @@ -28,6 +28,7 @@ class EnvTest extends TestCase $this->assertEquals('value1', $this->object->getVar('_APP_X')); $this->assertEquals('value2', $this->object->getVar('_APP_Y')); $this->assertEquals('value3', $this->object->getVar('_APP_Z')); + $this->assertEquals('value5=', $this->object->getVar('_APP_W')); $this->assertEquals('value4', $this->object->getVar('_APP_TEST')); }