Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cast configcat.log.level into integer #6

Merged
merged 2 commits into from
Sep 22, 2023
Merged

Conversation

clemblanco
Copy link
Contributor

This could be a problem where this could be set via environment variables

CONFIGCAT_LOG_LEVEL=50

which would correspond to

ConfigCat\Log\LogLevel::ERROR;

but would be interpreted as strings "50" instead of the value of the constant, which is an integer.

<?php

namespace ConfigCat\Log;

class LogLevel
{
    // ...
    const ERROR = 50;
    // ...
}

clemblanco and others added 2 commits September 22, 2023 12:25
This could be a problem where this could be set via environment variables 
```.env
CONFIGCAT_LOG_LEVEL=50
```
which would correspond to 
```php
ConfigCat\Log\LogLevel::ERROR;
```
but would be interpreted as strings `"50"` instead of the value of the constant, which is an integer.
```php
<?php

namespace ConfigCat\Log;

class LogLevel
{
    // ...
    const ERROR = 50;
    // ...
}
```
@clemblanco clemblanco merged commit 485aa85 into main Sep 22, 2023
2 checks passed
@clemblanco clemblanco deleted the fix-log-level-cast branch September 22, 2023 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants