Opened 14 years ago

Closed 14 years ago

#1378 closed Bug (Fixed)

Wrong error handling in _Date_Time_SetLocalTime

Reported by: MrCreatoR <mscreator@…> Owned by: Jpm
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:


Few functions in «Date.au3» (_SetDate and _SetTime) calls _Date_Time_SetLocalTime, but when used, they causing a fatal error because of wrong returns by _Date_Time_SetLocalTime.

The function check this:

If @error Or Not $aResult Then ...

but $aResult is an array if there is no error, so the function will still return False due to wrong variable's type comparision.
Should be this:

If @error Or Not $aResult[0] Then ...

And the last return of that function is also wrong, instead of Return $aResult[0] it should Return $aResult, because _SetDate and _SetTime are checking array.

Attachments (0)

Change History (1)

comment:1 Changed 14 years ago by Jpm

  • Milestone set to
  • Owner set to Jpm
  • Resolution set to Fixed
  • Status changed from new to closed

Fixed by revision [5520] in version:

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

as closed The owner will remain Jpm.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.