String[1] forbids empty php::settings value
Closed this issue · 3 comments
Hi folks,
this issue appears since latest 8.0.0 / #634.
Affected Puppet, Ruby, OS and module versions/distributions
- Module version: 8.0.0
How to reproduce (e.g Puppet code you use)
Excerpt:
class php {
settings => {
'PHP/user_ini.filename' => '',
}
}
What are you seeing
Error while evaluating a Resource Statement, Php::Config::Setting[/opt/php-7.2/etc/php.ini: PHP/user_ini.filename]: parameter 'value' expects a value of type Integer or String[1], got String (file: /etc/puppetlabs/code/environments/production/modules/php/manifests/config.pp, line: 28)`
What behaviour did you expect instead
set user_ini.filename
to empty value in the mentioned php.ini
.
Any additional information you'd like to impart
The empty string is valid:
https://www.php.net/manual/en/configuration.file.per-user.php
With the empty value on PHP/user_ini.filename
, PHP doesn't scan for a user-maintained php.ini.
Changing php::config::setting
from Variant[Integer, String[1]]
to Variant[Integer, String]
solves the issue, obviously - but I doubt that's actually the best or preferred approach.
Ah! I could not find a setting that has a default value that can be overridden by an empty string, but they seem to exist.
I opened #640 to fix this issue.
So, "bingo"? :)
Thanks for addressing so fast!
8.0.1 was released with the fix. Thanks for reporting the issue quickly!