Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Instrument] Allow fields to have value "0" (aces#6867)
The instrument getFieldValue function was doing a "!empty" check to see if the field is valid. This catches values such as "0" incorrectly and converts them to false. This changes it to array_key_exists to properly verify that the field is valid. At the same time, it converts the "false" error code return for an invalid field to an exception, since callers shouldn't be requesting the value of fields that don't exist on an instrument, and it indicates a programming error that is more likely to be caught this way.
- Loading branch information