Skip to content

Commit

Permalink
Check that the getenv function exists too
Browse files Browse the repository at this point in the history
  • Loading branch information
GrahamCampbell committed May 6, 2016
1 parent 40c41ac commit 00379ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ public function setEnvironmentVariable($name, $value = null)

// If PHP is running as an Apache module and an existing
// Apache environment variable exists, overwrite it
if (function_exists('apache_setenv') && apache_getenv($name)) {
if (function_exists('apache_getenv') && function_exists('apache_setenv') && apache_getenv($name)) {
apache_setenv($name, $value);
}

Expand Down

0 comments on commit 00379ab

Please sign in to comment.