Issue #6412 has been updated by Brice Figureau. Branch set to https://github.com/masterzen/puppet/tree/tickets/2.7.x/6412
I'm proposing a fix in the following pull request: https://github.com/puppetlabs/puppet/pull/211 ---------------------------------------- Bug #6412: Can not test hash key exist?, or array element exist? in puppet https://projects.puppetlabs.com/issues/6412 Author: Nan Liu Status: Accepted Priority: Normal Assignee: Category: language Target version: Affected Puppet version: 2.6.4 Keywords: Branch: https://github.com/masterzen/puppet/tree/tickets/2.7.x/6412 The following tests fails in puppet for both array and hash: $a=['1', '2', '3'] if $a[4] { notice ("a[4] exists.") } $b={} $b['bar'] = 'foo' if $b['baz'] { notice ("b['baz'] exists.") } The test is actually checking for the existence of variable $a, $b, testing using == undef, == '' does not correct this behavior. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
