Both infoids and _ap_password are intialized by check time. (#1344)

Comparing it to NULL raises operation overload.
This commit is contained in:
Pedro Gabriel Planel
2022-01-23 20:01:05 -06:00
committed by GitHub
parent 62ba184cc8
commit 9f6dcad791
+2 -2
View File
@@ -1904,7 +1904,7 @@ void WiFiManager::handleInfo() {
#endif
for(size_t i=0; i<infos;i++){
if(infoids[i] != NULL) page += getInfoData(infoids[i]);
if(!infoids[i].isEmpty()) page += getInfoData(infoids[i]);
}
page += F("</dl>");
if(_showInfoUpdate){
@@ -3227,7 +3227,7 @@ String WiFiManager::toStringIp(IPAddress ip) {
boolean WiFiManager::validApPassword(){
// check that ap password is valid, return false
if (_apPassword == NULL) _apPassword = "";
if (_apPassword.isEmpty()) _apPassword = "";
if (_apPassword != "") {
if (_apPassword.length() < 8 || _apPassword.length() > 63) {
#ifdef WM_DEBUG_LEVEL