diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b1142c87..0e397ace2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. * Hitting Ctrl+Z when editing a file on the web now works as expected. * Logo now links to the correct location on all pages. * Permissions checking to determine if a user can see the task management page now works correctly. +* Fixed `pterodactyl.environment_variables` to be used correctly for global environment variables. The wrong config variable name was being using previously. ### Changed * Attempting to upload a folder via the web file manager will now display a warning telling the user to use SFTP. diff --git a/app/Services/Servers/EnvironmentService.php b/app/Services/Servers/EnvironmentService.php index 85eb69bb8..b17076e07 100644 --- a/app/Services/Servers/EnvironmentService.php +++ b/app/Services/Servers/EnvironmentService.php @@ -78,7 +78,7 @@ class EnvironmentService } // Process variables set in the configuration file. - foreach ($this->config->get('pterodactyl.environment_mappings', []) as $key => $object) { + foreach ($this->config->get('pterodactyl.environment_variables', []) as $key => $object) { if (is_callable($object)) { $variables[$key] = call_user_func($object, $server); } else { diff --git a/tests/Unit/Services/Servers/EnvironmentServiceTest.php b/tests/Unit/Services/Servers/EnvironmentServiceTest.php index 0f7000209..acce1c683 100644 --- a/tests/Unit/Services/Servers/EnvironmentServiceTest.php +++ b/tests/Unit/Services/Servers/EnvironmentServiceTest.php @@ -12,7 +12,7 @@ use Pterodactyl\Contracts\Repository\ServerRepositoryInterface; class EnvironmentServiceTest extends TestCase { - const CONFIG_MAPPING = 'pterodactyl.environment_mappings'; + const CONFIG_MAPPING = 'pterodactyl.environment_variables'; /** * @var \Illuminate\Contracts\Config\Repository|\Mockery\Mock