#905 keyval store and non-table values

Reporter rafaeli
Owner Nobody
Created
Updated
Stars ★ (1)  
Tags
  • Priority-Medium
  • Type-Defect
  • Status-New
  1. rafaeli on

    What steps will reproduce the problem? 1. Create and enable a module with this contents (mod_xxx.lua): module:open_store('st'):set('ke', 'va') 2. Start Prosody 3. Observe the error Error message: Error initializing module 'xxx' on 'localhost': /usr/lib/prosody/util/datamanager.lua:203: bad argument #1 to 'next' (table expected, got string) What version of the product are you using? On what operating system? Prosody 0.9.12 Note: the store file is still written and can be loaded with no problems. Only the store() function is unhappy about the non-table data. There doesn't seem to be any issues with such data in general.

  2. Zash on

    FWIW, this also doesn't work with SQL storage. I don't think storing a string as a top level item is meant to be supported.

New comment

Not published. Used for spam prevention and optional update notifications.