diff --git a/WiFiManager.cpp b/WiFiManager.cpp index 5f26ae6..87ee235 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -1625,15 +1625,20 @@ String WiFiManager::getParamOut(){ bool tok_c = HTTP_PARAM_temp.indexOf(FPSTR(T_c)) > 0; char valLength[5]; - // add the extra parameters to the form + for (int i = 0; i < _paramsCount; i++) { - if (_params[i] == NULL || _params[i]->_length == 0) { + Serial.println((String)_params[i]->_length); + if (_params[i] == NULL || _params[i]->_length == 0 || _params[i]->_length > 99999) { + // try to detect param scope issues, doesnt always catch but works ok #ifdef WM_DEBUG_LEVEL DEBUG_WM(DEBUG_ERROR,F("[ERROR] WiFiManagerParameter is out of scope")); #endif - break; + return ""; } + } + // add the extra parameters to the form + for (int i = 0; i < _paramsCount; i++) { // label before or after, @todo this could be done via floats or CSS and eliminated String pitem; switch (_params[i]->getLabelPlacement()) {