Skip to content
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

Merged
merged 2 commits into from
Sep 25, 2024

Conversation

driusan
Copy link
Collaborator

@driusan driusan commented Sep 25, 2024

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

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.
Copy link
Contributor

@skarya22 skarya22 left a 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?

Comment on lines 238 to 239
? \CenterID::singleton(intval($values['psc']))
: null;
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

@skarya22 skarya22 assigned driusan and unassigned skarya22 Sep 25, 2024
@skarya22 skarya22 added the Needs Work PR awaiting additional changes by the author or contains issues that the author needs to fix label Sep 25, 2024
@driusan driusan removed the Needs Work PR awaiting additional changes by the author or contains issues that the author needs to fix label Sep 25, 2024
@driusan driusan assigned skarya22 and unassigned driusan Sep 25, 2024
@driusan
Copy link
Collaborator Author

driusan commented Sep 25, 2024

Created #9362 for the tests issue.

Copy link
Contributor

@skarya22 skarya22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@skarya22 skarya22 added the Passed Manual Tests PR has undergone proper testing by at least one peer label Sep 25, 2024
@driusan driusan merged commit 25008c9 into aces:main Sep 25, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Passed Manual Tests PR has undergone proper testing by at least one peer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Create_Timepoint] Failure on submit
2 participants