Nanobsd upgrade from 2.2.1 to 2.2.2 warnings



  • i upgraded nanobsd on alix and after upgrade the first boot i get this warning

    Configuring CRON...done.
    Starting DNS Resolver...
    Warning: in_array() expects parameter 2 to be array, null given in /etc/inc/unbo
    und.inc on line 239
    
    Warning: in_array() expects parameter 2 to be array, null given in /etc/inc/unbo
    und.inc on line 239
    
    Warning: in_array() expects parameter 2 to be array, null given in /etc/inc/unbo
    und.inc on line 239
    
    Warning: in_array() expects parameter 2 to be array, null given in /etc/inc/unbo
    und.inc on line 239
    
    Warning: in_array() expects parameter 2 to be array, null given in /etc/inc/unbo
    und.inc on line 239
    done.
    Starting NTP time client...done.
    Starting DHCP service...done.
    Configuring firewall......done.
    Generating RRD graphs...done.
    


  • same error comes up when saving anything in dns resolver section or general setup section

    Warning: in_array() expects parameter 2 to be array, null given in /etc/inc/unbound.inc on line 239 Warning: in_array() expects parameter 2 to be array, null given in /etc/inc/unbound.inc on line 239 Warning: in_array() expects parameter 2 to be array, null given in /etc/inc/unbound.inc on line 239 Warning: in_array() expects parameter 2 to be array, null given in /etc/inc/unbound.inc on line 239 Warning: in_array() expects parameter 2 to be array, null given in /etc/inc/unbound.inc on line 239 
    


  • Apologies, I broke that in the case when Unbound has forwarding on, but dnsallowoverride is off. The relevant array was not being created at all.
    Pull request for master: https://github.com/pfsense/pfsense/pull/1615



  • that patch fixes it



  • From my testing of the code path, the required code in the loop does execute even when the warning happens - the non-existent variable acts enough like an empty array that the code takes the same path as if there really was an empty $ns array. It does not look very nice spewing the warning out on the GUI, but the code works as intended. That means that there is no functional breakage, thankfully.



  • yes with the warning also everything works fine but with the patch the warning goes away and everything still working



  • I wonder how do I fix this error and apply the fix ..



  • in pfsense gui goto diagnostics -> edit file and open the etc/inc/unbound.inc file and add the 2 extra lines mentioned in the patch



  • Hi all.

    I'm struggling with this.

    When I add the two lines I end up seeing the error

    Parse error: syntax error, unexpected 'else' (T_ELSE) in /etc/inc/unbound.inc on line 257

    When I visit services->DNS Resolver.

    At this point the resolver will not start and I have to use the forwarder.  This is on the serial I386 2.2.2 install.