Skip to content
Snippets Groups Projects
  • Roeland Jago Douma's avatar
    43175082
    Store setUserValue as string in cache · 43175082
    Roeland Jago Douma authored
    
    We cache the values we set in the setUserValue function.
    However since the values are strings in the database we check if a value
    is equal with string comparison
    
    Now if the function was called with a $value of int or float. It would
    be stored in the DB (and thus converted to string) and in the cache (not
    converted thus as int/float).
    
    Now if another call comes in that sets it to the same value (I'm looking
    at you LDAP!). The check would fail since we would be comparing
    int/float to string which fails by definition.
    
    Signed-off-by: default avatarRoeland Jago Douma <roeland@famdouma.nl>
    43175082
    History
    Store setUserValue as string in cache
    Roeland Jago Douma authored
    
    We cache the values we set in the setUserValue function.
    However since the values are strings in the database we check if a value
    is equal with string comparison
    
    Now if the function was called with a $value of int or float. It would
    be stored in the DB (and thus converted to string) and in the cache (not
    converted thus as int/float).
    
    Now if another call comes in that sets it to the same value (I'm looking
    at you LDAP!). The check would fail since we would be comparing
    int/float to string which fails by definition.
    
    Signed-off-by: default avatarRoeland Jago Douma <roeland@famdouma.nl>