MKR1000 - Wifi101.config() - to set ONLY IP & Gateway addr w/o destroying DNS?

OK Pert - thanks again for verifying.

This is definitely a bug in the WiFi.config() function!
It seems it ONLY works if one supplies ALL four parameters but as there is no way to get the DNS originally assigned during Wifi Connection, one has to set it to a new one (not ideal for all WiFi networks - would prefer to keep whatever DNS was originally assigned - like I am doing with Gateway Address below).

So a temporarily workaround is to set the DNS to Google's DNS (8,8,8,8), so that I can supply ALL FOUR parameters to WiFi.config, ie:

  IPAddress googleDNS(8,8,8,8);       // as bug in WiFi.config(...) destroys DNS if not all parameters supplied, so will set DNS to google's DNS for now!
  IPAddress subnet(255,255,255,0);    // required for WiFi.config()
  IPAddress gatewayIP(0,0,0,0);                    
  gatewayIP = WiFi.gatewayIP();       // get gateway address so that it can be reset to same when new static IP is configured
  WiFi.config(staticIP,googleDNS,gatewayIP,subnet);

So this is OK for now but it would be nice to get the Wifi.config() function to work as advertised (ie: using Wifi.config(newIPaddress) should NOT destroy gateway and DNS addresses).