diff options
author | Badlop <badlop@process-one.net> | 2011-06-01 23:22:25 +0200 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2011-06-01 23:22:25 +0200 |
commit | 33544569fba371e7757bccddd7d34883ba7b0002 (patch) | |
tree | 0e276e84172f273b0ce8bd616e3330ee9f0de035 /src | |
parent | Recompile the Guide (diff) |
Fix crash when user publishes an item (EJAB-1457)
Diffstat (limited to 'src')
-rw-r--r-- | src/mod_pubsub/mod_pubsub.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mod_pubsub/mod_pubsub.erl b/src/mod_pubsub/mod_pubsub.erl index 41501b2c2..38d56d17c 100644 --- a/src/mod_pubsub/mod_pubsub.erl +++ b/src/mod_pubsub/mod_pubsub.erl @@ -2024,8 +2024,8 @@ publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload) -> DeliverPayloads = get_option(Options, deliver_payloads), PersistItems = get_option(Options, persist_items), MaxItems = case PersistItems of - 0 -> 0; - 1 -> max_items(Host, Options) + false -> 0; + true -> max_items(Host, Options) end, PayloadCount = payload_xmlelements(Payload), PayloadSize = size(term_to_binary(Payload))-2, % size(term_to_binary([])) == 2 |