Skip to content

Commit 00379ab

Browse files
Check that the getenv function exists too
Closes #178 //cc @vlucas, @GabeMedrash, @sfolador
1 parent 40c41ac commit 00379ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Loader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ public function setEnvironmentVariable($name, $value = null)
337337

338338
// If PHP is running as an Apache module and an existing
339339
// Apache environment variable exists, overwrite it
340-
if (function_exists('apache_setenv') && apache_getenv($name)) {
340+
if (function_exists('apache_getenv') && function_exists('apache_setenv') && apache_getenv($name)) {
341341
apache_setenv($name, $value);
342342
}
343343

0 commit comments

Comments
 (0)