We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a87aada commit c6f4b4fCopy full SHA for c6f4b4f
App/Models/Env.php
@@ -24,7 +24,9 @@ private function readEnvFile($envFilePath)
24
}
25
// Parse lines in the format KEY=VALUE
26
if (preg_match("/^([^=]+)=(.*)$/", $line, $matches)) {
27
- $envData[$matches[1]] = $matches[2]; // Store the key-value pair in the $envData array
+ $key = trim($matches[1]);
28
+ $value = trim($matches[2], "\" \n\r\t");
29
+ $envData[$key] = $value; // Store the key-value pair in the $envData array
30
31
32
fclose($file); // Close the environment file
@@ -40,4 +42,4 @@ public function get($key)
40
42
41
43
return null; // Return null if the key is not found
44
-}
45
+}
0 commit comments