summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/parser/functions/defined_with_params.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/puppet/parser/functions/defined_with_params.rb b/lib/puppet/parser/functions/defined_with_params.rb
index e09e41c..d7df306 100644
--- a/lib/puppet/parser/functions/defined_with_params.rb
+++ b/lib/puppet/parser/functions/defined_with_params.rb
@@ -20,7 +20,9 @@ ENDOFDOC
) do |vals|
reference, params = vals
raise(ArgumentError, 'Must specify a reference') unless reference
- params ||= {}
+ if (! params) || params == ''
+ params = {}
+ end
ret = false
if resource = findresource(reference.to_s)
matches = params.collect do |key, value|