Ticket #523 (closed enhancement: invalid)

Opened 5 years ago

Last modified 5 years ago

parseParams() should return error if required parameter is missing

Reported by: FND Owned by: FND
Priority: minor Milestone:
Component: core Version:
Severity: low Keywords:
Cc:

Description

If a default name is not provided, parseParams() cannot cope. The attached patch fixes this issue by returning false if defaultName has not been specified.

Attachments

ticket523.patch Download (473 bytes) - added by FND 5 years ago.

Change History

Changed 5 years ago by FND

Changed 5 years ago by FND

  • owner changed from JeremyRuston to FND
  • status changed from new to assigned

Changed 5 years ago by JeremyRuston

  • status changed from assigned to closed
  • resolution set to invalid

The semantics of parseParams() are that either defaultName or defaultValue can be provided. If defaultName is provided, then any single token parameters are taken to be values, with the name being specified in defaultName. If instead {{defaultValue}}} is defined, then any single token parameters are taken to be names, with the value being specified in defaultValue.

There is a potential error condition if neither defaultName or defaultValue is provided, but this only occurs if the parameter string in question includes any single token values. The current patch incorrectly treats a missing defaultName as an error.

Note: See TracTickets for help on using tickets.