summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Schmitt <david.schmitt@puppet.com>2016-10-04 14:11:17 +0100
committerDavid Schmitt <david.schmitt@puppet.com>2016-10-04 14:11:17 +0100
commit3c12e20526b4c6c6e36f6acc103f42f7e5915477 (patch)
tree920fd0087601c2ca17737cedaa85cfc7ad597c6d /lib
parent6ebb58623c49f738e2fe857974d54eb5c8638cea (diff)
(MODULES-3933) Fix getparam for 'false' values
This is the idiomatic version of #634, and also addresses the test failures. Original-Fix-By: Michiel Brandenburg <michiel@silverstreet.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/parser/functions/getparam.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/puppet/parser/functions/getparam.rb b/lib/puppet/parser/functions/getparam.rb
index 6d51006..0a5cbe0 100644
--- a/lib/puppet/parser/functions/getparam.rb
+++ b/lib/puppet/parser/functions/getparam.rb
@@ -28,7 +28,7 @@ ENDOFDOC
return '' if param.empty?
if resource = findresource(reference.to_s)
- return resource[param] if resource[param]
+ return resource[param] unless resource[param].nil?
end
return ''