luci-lua-runtime: ensure proper forwarding of route arguments to cbi action
Ensure that the optional cbi() `config` argument is set to an empty table if unspecified to ensure that the static call argument array is exactly two elements long, otherwise call arguments are shifted and the invoked method might not receive the expected parameter. This fixes, among others, the dispatching of `arcombine()` targets. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
3ec7bff0d1
commit
ca57291bdd
1 changed files with 1 additions and 1 deletions
|
@ -392,7 +392,7 @@ function cbi(model, config)
|
|||
["type"] = "call",
|
||||
["module"] = "luci.dispatcher",
|
||||
["function"] = "invoke_cbi_action",
|
||||
["parameters"] = { model, config },
|
||||
["parameters"] = { model, config or {} },
|
||||
["post"] = {
|
||||
["cbi.submit"] = true
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue