« Return to Thread: [Bug 661] New: comparison bug in loop macro in HopObject.js

[Bug 661] New: comparison bug in loop macro in HopObject.js

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View in Thread

http://dev.helma.org/bugs/show_bug.cgi?id=661

           Summary: comparison bug in loop macro in HopObject.js
           Product: Helma
           Version: 1.6.3
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P5
         Component: helmaLib, helmaTools
        AssignedTo: helma-dev@...
        ReportedBy: maksim.lin@...


On line 139, the comparison:
if (!test || isNaN(test)) {

fails incorrectly if the first elements property that you are using is numeric
and happens to be value of zero (thanks to js type coercion).
This fixes the problem:
((test === undefined) || (test === null) || isNaN(test)) {

--
Configure bugmail: http://dev.helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

 « Return to Thread: [Bug 661] New: comparison bug in loop macro in HopObject.js