Skip to content

Commit bad9ae5

Browse files
SergZyDaneEveritt
authored andcommitted
Fix environment_variables name (pterodactyl#1212)
1 parent ad9ed5e commit bad9ae5

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
1212
* Hitting Ctrl+Z when editing a file on the web now works as expected.
1313
* Logo now links to the correct location on all pages.
1414
* Permissions checking to determine if a user can see the task management page now works correctly.
15+
* Fixed `pterodactyl.environment_variables` to be used correctly for global environment variables. The wrong config variable name was being using previously.
1516

1617
### Changed
1718
* Attempting to upload a folder via the web file manager will now display a warning telling the user to use SFTP.

app/Services/Servers/EnvironmentService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function handle(Server $server): array
7878
}
7979

8080
// Process variables set in the configuration file.
81-
foreach ($this->config->get('pterodactyl.environment_mappings', []) as $key => $object) {
81+
foreach ($this->config->get('pterodactyl.environment_variables', []) as $key => $object) {
8282
if (is_callable($object)) {
8383
$variables[$key] = call_user_func($object, $server);
8484
} else {

tests/Unit/Services/Servers/EnvironmentServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
class EnvironmentServiceTest extends TestCase
1414
{
15-
const CONFIG_MAPPING = 'pterodactyl.environment_mappings';
15+
const CONFIG_MAPPING = 'pterodactyl.environment_variables';
1616

1717
/**
1818
* @var \Illuminate\Contracts\Config\Repository|\Mockery\Mock

0 commit comments

Comments
 (0)