This question is more out of curiosity, then out of a need to solve something.
I was trying out some experiments with the ESP8266 Arduino core when I realized that I had programmed an SSID and password for the ESP8266, but the WiFi that I had set up was an open network.
I tried going through the documentation and then the Arduino core source code, but couldn't find if WiFi.begin(ssid,passphrase)
a function does this on purposes, as in it was designed that way, or did it just happen to work this way.
Also, I would like to know if there is a way to stop the ESP from connecting to an open network when the passphrase is provided.