Page MenuHomeDevCentral

D36.id90.diff
No OneTemporary

D36.id90.diff

diff --git a/files/usr/local/lib/php-fpm-env/PhpFpmEnvironment.php b/files/usr/local/lib/php-fpm-env/PhpFpmEnvironment.php
--- a/files/usr/local/lib/php-fpm-env/PhpFpmEnvironment.php
+++ b/files/usr/local/lib/php-fpm-env/PhpFpmEnvironment.php
@@ -38,19 +38,45 @@
$variables = [];
foreach ($_ENV as $key => $value) {
- if (static::mustIgnoreVariable($key)) {
- continue;
+ if (!static::mustIgnoreVariable($key)) {
+ $variables[$key] = $value;
}
-
- $variables[$key] = $value;
}
- $variables['PATH'] = static::PATH;
+ static::addHardcodedEnvironmentVariables($variables);
+
+ return $variables;
+ }
+
+ /**
+ * Adds hardcoded and always wanted environment variables
+ * (path, temporary directory) to the specified array.
+ *
+ * @paran array $variables the array to add the variables to
+ */
+ public static function addHardcodedEnvironmentVariables (&$variables) {
+ static::addTempEnvironmentVariables ($variables);
+ static::addPathEnvironmentVariables ($variables);
+ }
+
+ /**
+ * Adds temporary directory environment variables to the specified array.
+ *
+ * @paran array $variables the array to add the variables to
+ */
+ public static function addTempEnvironmentVariables (&$variables) {
$variables['TMP'] = static::TMP;
$variables['TEMP'] = static::TMP;
$variables['TMPDIR'] = static::TMP;
+ }
- return $variables;
+ /**
+ * Adds temporary directory environment variables to the specified array.
+ *
+ * @paran array $variables the array to add the variables to
+ */
+ public static function addPathEnvironmentVariables (&$variables) {
+ $variables['PATH'] = static::PATH;
}
/**

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 6, 11:11 (21 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2178335
Default Alt Text
D36.id90.diff (1 KB)

Event Timeline