mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-27 07:34:15 +02:00
Use an empty dictionary for the 'this' scope when executing commands with Livestatus
fixes #9883
This commit is contained in:
parent
d30d1d4dda
commit
9b0375bed8
@ -636,6 +636,7 @@ void LivestatusQuery::ExecuteScriptHelper(const Stream::Ptr& stream)
|
|||||||
expr = ConfigCompiler::CompileText(fileName, m_Command, false);
|
expr = ConfigCompiler::CompileText(fileName, m_Command, false);
|
||||||
ScriptFrame frame;
|
ScriptFrame frame;
|
||||||
frame.Locals = lsf.Locals;
|
frame.Locals = lsf.Locals;
|
||||||
|
frame.Self = lsf.Locals;
|
||||||
result = expr->Evaluate(frame);
|
result = expr->Evaluate(frame);
|
||||||
} catch (const ScriptError& ex) {
|
} catch (const ScriptError& ex) {
|
||||||
delete expr;
|
delete expr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user