From 3c12e20526b4c6c6e36f6acc103f42f7e5915477 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Tue, 4 Oct 2016 14:11:17 +0100 Subject: (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 --- lib/puppet/parser/functions/getparam.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/puppet/parser/functions') 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 '' -- cgit v1.2.3