Skip to content
Snippets Groups Projects
  • Lukas Reschke's avatar
    f0ac8a27
    Use json_encode on string · f0ac8a27
    Lukas Reschke authored
    It's better to encode the string to prevent possible (yet unknown) bugs in combination with PHP's type juggling.
    
    Previously the boolean statements evaluated to either an empty string (false) or a not empty one (true, then it was 1). Not it always evaluates to false or true.
    
    This also removes a stray - that was not intended there but shouldn't have produced any bugs. Just to increase readability.
    
    Thanks @nickvergessen for spotting.
    
    Addresses https://github.com/owncloud/core/pull/13235/files#r22852319
    f0ac8a27
    History
    Use json_encode on string
    Lukas Reschke authored
    It's better to encode the string to prevent possible (yet unknown) bugs in combination with PHP's type juggling.
    
    Previously the boolean statements evaluated to either an empty string (false) or a not empty one (true, then it was 1). Not it always evaluates to false or true.
    
    This also removes a stray - that was not intended there but shouldn't have produced any bugs. Just to increase readability.
    
    Thanks @nickvergessen for spotting.
    
    Addresses https://github.com/owncloud/core/pull/13235/files#r22852319