diff options
author | Jeff McCune <jeff@puppetlabs.com> | 2012-10-25 10:00:42 -0700 |
---|---|---|
committer | Jeff McCune <jeff@puppetlabs.com> | 2012-10-25 10:00:45 -0700 |
commit | e68677976b671eb8b7f81393dc6dac6c6d86410c (patch) | |
tree | a8530a855d272b4f63b506356294cc15943d181c /lib/puppet/parser/functions/is_integer.rb | |
parent | ba70a3885af452aea72d408f447c5bc7fd8bf0c0 (diff) | |
download | puppet-stdlib-e68677976b671eb8b7f81393dc6dac6c6d86410c.tar.gz puppet-stdlib-e68677976b671eb8b7f81393dc6dac6c6d86410c.tar.bz2 |
Prevent undefined method `split' for nil:NilClass with pe_foo_version facts
Without this patch the pe_major_version, pe_minor_version, and
pe_patch_version facts directly depend on the pe_version fact in a
manner that calls split directly on the return value.
This is a problem because Fact values are not always guaranteed to
return strings, or objects that respond to split. This patch is a
defensive measure to ensure we're always calling the split method on a
string object.
If the Fact returns nil, this will be converted to an empty string
responding to split.
Diffstat (limited to 'lib/puppet/parser/functions/is_integer.rb')
0 files changed, 0 insertions, 0 deletions