From: Gunnar Beutner Date: Sat, 15 Nov 2014 11:19:29 +0000 (+0100) Subject: Fix "object list" output for empty fields X-Git-Tag: v2.2.0~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bae96ca5245a7d9b4356bdd65cd1be21e627e330;p=icinga2 Fix "object list" output for empty fields --- diff --git a/lib/cli/objectlistcommand.cpp b/lib/cli/objectlistcommand.cpp index 0e36ba9d1..7d48075e8 100644 --- a/lib/cli/objectlistcommand.cpp +++ b/lib/cli/objectlistcommand.cpp @@ -227,6 +227,11 @@ void ObjectListCommand::PrintValue(std::ostream& fp, const Value& val) return; } + if (val.IsEmpty()) { + fp << "null"; + return; + } + fp << Convert::ToString(val); }