Repository navigation
fix(docker): no PHP warning for a HaRP daemon without a key - #1133
Conversation
Signed-off-by: Oleksandr Piskun <oleksandr2088@icloud.com>
|
/backport to stable35 |
|
/backport to stable34 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
DockerActions::initGuzzleClient()took the value of theharp-shared-keyheader from the basic auth credentials, which are only set when the daemon has a key. For a HaRP daemon without one, every call logged two PHP warnings,Undefined array key "auth"andTrying to access array offset on null. The easiest way to get there is Check connection in the register dialog before a key is typed, which is the default state of the form now that the templates no longer prefill a key.The header now falls back to an empty string. Guzzle already sent an empty header for the missing value, so the requests stay the same and only the warnings are gone. A unit test covers a HaRP daemon without a key.