Changes between Initial Version and Version 1 of Ticket #3054, comment 7


Ignore:
Timestamp:
06/22/15 01:10:00 (9 years ago)
Author:
BrewManNH
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3054, comment 7

    initial v1  
    11That doesn't explain why it is set that way, or when it was changed, or where it was documented. If you make a change like this, it needs to be documented.
    22
    3 By the way, if @error is zero, then setting it to 10 means that the next If statement will fire, and it will incorrectly return from the function with an error message. If you wanted to correct for any possible non-zero error, then you should be checking for zero first, and then change its value.
     3Where 10 is being added to the @error value is definitely a bug. If you wanted to return a non-zero value for the $aRet[0] being 0 then you should be adding 10 to the $iError variable AFTER the If statement, not before it. The way it was rewritten guarantees that it will always return an error condition unless @error is -10.