Fix "undefined method `gsub' for nil:NilClass" when changing existing rule UID from...
authorAristarkh Zagorodnikov <xm@drive.net>
Tue, 31 Aug 2021 09:31:01 +0000 (12:31 +0300)
committerAristarkh Zagorodnikov <xm@drive.net>
Tue, 31 Aug 2021 09:31:01 +0000 (12:31 +0300)
lib/puppet/type/firewall.rb

index bd57ce9562967770a6d2483315f6ec46829a3884..d46316bf7e0fb2f62dd6bdcf84a65d1fb68b74fa 100644 (file)
@@ -1366,6 +1366,8 @@ Puppet::Type.newtype(:firewall) do
       statement.
     PUPPETCODE
     def insync?(is)
+      return false unless is
+
       require 'etc'
 
       # The following code allow us to take into consideration unix mappings
@@ -1413,6 +1415,8 @@ Puppet::Type.newtype(:firewall) do
       statement.
     PUPPETCODE
     def insync?(is)
+      return false unless is
+
       require 'etc'
 
       # The following code allow us to take into consideration unix mappings