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 calling function empty() with Numeric value #243

Merged
merged 1 commit into from
Nov 19, 2023

Conversation

smortex
Copy link
Contributor

@smortex smortex commented Nov 19, 2023

This produce a warning:

2023-11-19T05:33:05.421+02:00 WARN [qtp925335889-44] [puppetserver] Puppet Calling function empty() with Numeric value is deprecated. (file: /usr/local/etc/puppet/code/environments/production/modules/dns/manifests/logging/channel.pp, line: 61)

Since we have data-types in place (Optional[Integer]), we do not need
to care about an empty String. Only undef will evaluate to false, and
it is the precise case we want to raise an error for.

This produce a warning:

```
2023-11-19T05:33:05.421+02:00 WARN [qtp925335889-44] [puppetserver] Puppet Calling function empty() with Numeric value is deprecated. (file: /usr/local/etc/puppet/code/environments/production/modules/dns/manifests/logging/channel.pp, line: 61)
```

Since we have data-types in place (`Optional[Integer]`), we do not need
to care about an empty String.  Only `undef` will evaluate to false, and
it is the precise case we want to raise an error for.
@ekohl ekohl merged commit a3913eb into theforeman:master Nov 19, 2023
23 checks passed
@smortex smortex deleted the fix-deprecation-warning branch November 19, 2023 19:47
@smortex smortex restored the fix-deprecation-warning branch November 19, 2023 19:47
@ekohl ekohl added the Bug label Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants