mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1583] [ERROR] WiFiManagerParameter is out of scope BUT it's not out of scope #1353
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#1353
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @olonsoft on GitHub (Apr 8, 2023).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1583
I was puzzled by this problem for one week until I found it was not my code's fault.
I kept getting
[ERROR] WiFiManagerParameter is out of scopewhile I was trying to save my custom parameters.I completely refactored my code many times, but the result was the same.
I could successfully load the parameters and display them while starting the webportal but when I was saving them, there was the mentioned error.
Debugging wm code I saw that in function
the
_lengthwas always 0.In a similar function
getParamOut()theifisif (_params[i] == NULL || _params[i]->_length > 99999) {So I changed the
doParamSave()code toif (_params[i] == NULL || _params[i]->_length > 99999) {and now my application works without a problem.
Using the latest version as of 2023-04-08
@CircuitSetup commented on GitHub (May 2, 2023):
I just ran into the same issue, and this solved it. It seems like that check isn't doing what it's supposed to under certain conditions. I'm not sure what that condition is though.
@realA10001986 commented on GitHub (May 2, 2023):
That happens with customHTML-WiFiManagerParameter parameters, and is clearly a regression.
The _length field of such Parameters is now set to 0 (previously it was set to 1) in WiFiManagerParameter::WiFiManagerParameter(const char *custom), see line 34 of WiFiManager.cpp.
If _length 0 is now a thing, the OP is correct as to change the check.
@burner- commented on GitHub (Dec 10, 2023):
Looks that this is closed at May 2 but not fixed in May 11 release. Advanced example ino wont work properly because of this bug.