Fix crash when user publishes an item (EJAB-1457)
This commit is contained in:
parent
529ab22a79
commit
33544569fb
|
@ -2024,8 +2024,8 @@ publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload) ->
|
||||||
DeliverPayloads = get_option(Options, deliver_payloads),
|
DeliverPayloads = get_option(Options, deliver_payloads),
|
||||||
PersistItems = get_option(Options, persist_items),
|
PersistItems = get_option(Options, persist_items),
|
||||||
MaxItems = case PersistItems of
|
MaxItems = case PersistItems of
|
||||||
0 -> 0;
|
false -> 0;
|
||||||
1 -> max_items(Host, Options)
|
true -> max_items(Host, Options)
|
||||||
end,
|
end,
|
||||||
PayloadCount = payload_xmlelements(Payload),
|
PayloadCount = payload_xmlelements(Payload),
|
||||||
PayloadSize = size(term_to_binary(Payload))-2, % size(term_to_binary([])) == 2
|
PayloadSize = size(term_to_binary(Payload))-2, % size(term_to_binary([])) == 2
|
||||||
|
|
Loading…
Reference in New Issue