Skip to content

Commit

Permalink
[API] Accessing CommentID using accessor function (#8796)
Browse files Browse the repository at this point in the history
Fixes a fatal error thrown by the api when trying to access instrument data of a json instrument.
  • Loading branch information
xlecours authored Jun 20, 2023
1 parent 737b67e commit f1c1327
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/api/php/views/visit/instrument.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ class Instrument
{
$instrumentname = $this->_instrument->testName;
$instrumentdata = $this->_instrument->getInstanceData();
$commentid = $this->_instrument->getCommentID() ?? '';

$isDDE = strpos($instrumentdata['CommentID'], 'DDE_') === 0;
$isDDE = strpos($commentid, 'DDE_') === 0;

$meta = [
'Candidate' => $this->_timepoint->getCandID(),
Expand Down

0 comments on commit f1c1327

Please sign in to comment.