Menu

Bug with conditional put in 0.7.2

Help
2010-04-07
2013-04-29
  • Jordan Snodgrass

    Hey there, it's me again with another bug.  :)

    When passing in an $expected array to putAttributes(), you check "if ($v{'value'})" before calling $rest->setParameter(), but this will evaluate to FALSE if $v{'value'} is '0'.  We use '0' a lot in SDB so this is a problem.  It is easily fixed by using "if (isset($v{'value'}))" instead.  The same applies a few lines down where you're checking on $v{exists}.

    I used curly brackets here to get around the BBCode.  :)

     
  • Jordan Snodgrass

    Oh, the same applies to deleteAttributes()

     
  • Dan Myers

    Dan Myers - 2010-04-07

    Awesome :)  I'll fix the subversion trunk later today.

     
  • Dan Myers

    Dan Myers - 2010-04-08

    Committed to trunk.  Let me know if I broke anything ;)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.