-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[create_timepoint] Fix type errors in timepoint creation #9361
Conversation
LorisForm returns values as strings, but \ProjectID::singleton and \CenterID::singleton take integer values. This updates the singleton calls to cast as an int to fix the type errors on timepoint creation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Further, how did the testCreateTimepoint() pass in
create_timepoint/test/create_timepointTest.php
in the original PR that introduced this error? Should this be looked into?
? \CenterID::singleton(intval($values['psc'])) | ||
: null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you indent these two lines?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This indentation came from npm run lintfix:php
.. I just tried to manually indent it and it looks like PHPCS doesn't complain, so sure.
Created #9362 for the tests issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
LorisForm returns values as strings, but \ProjectID::singleton and \CenterID::singleton take integer values. This updates the singleton calls to cast as an int to fix the type errors on timepoint creation.
Fixes #9357