mirror of https://github.com/Icinga/icinga2.git
Make sure to not ignore fields which are set to an empty string
fixes #8496
This commit is contained in:
parent
95ef230076
commit
6dd33fa751
|
@ -673,7 +673,7 @@ void IdoMysqlConnection::InternalExecuteQuery(const DbQuery& query, DbQueryType
|
||||||
BOOST_FOREACH(const Dictionary::Pair& kv, query.Fields) {
|
BOOST_FOREACH(const Dictionary::Pair& kv, query.Fields) {
|
||||||
Value value;
|
Value value;
|
||||||
|
|
||||||
if (kv.second.IsEmpty())
|
if (kv.second.IsEmpty() && !kv.second.IsString())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!FieldToEscapedString(kv.first, kv.second, &value))
|
if (!FieldToEscapedString(kv.first, kv.second, &value))
|
||||||
|
|
|
@ -668,7 +668,7 @@ void IdoPgsqlConnection::InternalExecuteQuery(const DbQuery& query, DbQueryType
|
||||||
Value value;
|
Value value;
|
||||||
bool first = true;
|
bool first = true;
|
||||||
BOOST_FOREACH(const Dictionary::Pair& kv, query.Fields) {
|
BOOST_FOREACH(const Dictionary::Pair& kv, query.Fields) {
|
||||||
if (kv.second.IsEmpty())
|
if (kv.second.IsEmpty() && !kv.second.IsString())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!FieldToEscapedString(kv.first, kv.second, &value))
|
if (!FieldToEscapedString(kv.first, kv.second, &value))
|
||||||
|
|
Loading…
Reference in New Issue