Issue #4692 has been updated by Paul Berry. Subject changed from empty factor variable causes private method `split' called for :undef:Symbol to undefined variables cause :undef to be passed to functions Status changed from Accepted to Ready for Testing % Done changed from 0 to 100 Branch set to http://github.com/stereotype441/puppet/tree/ticket/2.6.x/4692
The problem is that when a function (such as "split") is called on an undefined variable, :undef is passed to the function. We hadn't intended for this to happen. We'd intended for :undef to only be used internally within Puppet to distinguish between undefined variables and variables whose values are the empty string. When executing a function, we should follow the old (0.25.x) contract and pass the empty string for these variables. I'm submitting a patch that restores the old behavior. ---------------------------------------- Bug #4692: undefined variables cause :undef to be passed to functions http://projects.puppetlabs.com/issues/4692 Author: micah - Status: Ready for Testing Priority: Normal Assignee: Paul Berry Category: functions Target version: 2.6.2 Affected version: 2.6.0 Keywords: Branch: http://github.com/stereotype441/puppet/tree/ticket/2.6.x/4692 I have upgraded my puppetmaster to 2.6-rc3, and ran a puppet run on one of my clients that is running 0.25.5. i have a manifest that does a: $attrdrives = split($diskdrives_smartattr, ","), but now with the new puppet 2.6, that gives me an error when the manifest is run: <pre>private method `split' called for :undef:Symbol</pre> This is because the $diskdrives_smartattr variable is empty. Previously this wouldn't cause this error. I can fix this in my manifest by doing something like putting an if test of the variable: <pre> if $diskdrives_smartattr { $attrdrives = split($diskdrives_smartattr, ",") smart::smartattr { $attrdrives: } } </pre> -- 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.
