mirror of https://github.com/Icinga/icinga2.git
WarnOnImplicitlySetGlobalVar(): warn only on sins inside actual DSL code
This commit is contained in:
parent
3a154516dc
commit
b4e3736e31
|
@ -560,7 +560,7 @@ void WarnOnImplicitlySetGlobalVar(const std::unique_ptr<Expression>& setLhs, con
|
|||
if (var && setLhsParent.IsObject()) {
|
||||
auto ns (dynamic_pointer_cast<Namespace>(setLhsParent.Get<Object::Ptr>()));
|
||||
|
||||
if (ns && ns == ScriptGlobal::GetGlobals()) {
|
||||
if (ns && ns == ScriptGlobal::GetGlobals() && debug.Path.GetLength()) {
|
||||
const char *opStr = nullptr;
|
||||
|
||||
switch (setOp) {
|
||||
|
|
Loading…
Reference in New Issue