Skip to content

Conversation

@UlrichEckhardt
Copy link
Contributor

This PR comes from a discussion in #675 and fixes one obstacle to the Mezzio integration, but also a general bug that other code would be affected by. Thanks to original author @DominicDetta!

One reason is that `putenv()` won't update `$_ENV`, which breaks code
that uses `$_ENV` to read the environment.

For further reference, see

- itsgoingd#675
- https://stackoverflow.com/questions/3780866/why-is-my-env-empty

Thanks to original author DominicDetta <[email protected]>!
@UlrichEckhardt UlrichEckhardt force-pushed the fix/use-getenv-for-config branch from 29ba9a6 to 6e1d71e Compare February 22, 2024 19:07
@itsgoingd itsgoingd merged commit adb0209 into itsgoingd:master Feb 24, 2024
@itsgoingd
Copy link
Owner

Thanks!

@UlrichEckhardt UlrichEckhardt deleted the fix/use-getenv-for-config branch February 24, 2024 15:56
*/

'enable' => isset($_ENV['CLOCKWORK_ENABLE']) ? $_ENV['CLOCKWORK_ENABLE'] : true,
'enable' => getenv('CLOCKWORK_ENABLE') !== false ? getenv('CLOCKWORK_ENABLE') : false,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default was enabled, now it's not. It is not obvious in this commit, may be this is a mistake?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was a mistake, I'm sure.

UlrichEckhardt added a commit to UlrichEckhardt/clockwork that referenced this pull request Mar 7, 2024
UlrichEckhardt added a commit to UlrichEckhardt/clockwork that referenced this pull request Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants