From 9b0375bed87d8152401e7eb7dded44c0bf209209 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 11 Aug 2015 13:58:02 +0200 Subject: [PATCH] Use an empty dictionary for the 'this' scope when executing commands with Livestatus fixes #9883 --- lib/livestatus/livestatusquery.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/livestatus/livestatusquery.cpp b/lib/livestatus/livestatusquery.cpp index cc27fab8c..e34da40aa 100644 --- a/lib/livestatus/livestatusquery.cpp +++ b/lib/livestatus/livestatusquery.cpp @@ -636,6 +636,7 @@ void LivestatusQuery::ExecuteScriptHelper(const Stream::Ptr& stream) expr = ConfigCompiler::CompileText(fileName, m_Command, false); ScriptFrame frame; frame.Locals = lsf.Locals; + frame.Self = lsf.Locals; result = expr->Evaluate(frame); } catch (const ScriptError& ex) { delete expr;