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

[API] fix POST to candidates type error #6877

Merged
merged 1 commit into from
Aug 5, 2020

Conversation

ridz1208
Copy link
Collaborator

Brief summary of changes

Fix for PHP Fatal error: Uncaught TypeError: Argument 4 passed to Candidate::createNew() must be an instance of LORIS\\StudyEntities\\Candidate\\Sex, string given, called in /var/www/loris/modules/api/php/endpoints/candidates.class.inc on line 213

Testing instructions (if applicable)

  1. Use the API to POST a new candidate.

@ridz1208 ridz1208 added the Category: Bug PR or issue that aims to report or fix a bug label Jul 30, 2020
@ridz1208
Copy link
Collaborator Author

@driusan main or 23.0-release ?

@driusan
Copy link
Collaborator

driusan commented Jul 30, 2020

if it's broken on 23, 23-release

@ridz1208 ridz1208 changed the base branch from main to 23.0-release July 30, 2020 18:29
@ridz1208 ridz1208 added the State: Needs rebase PR that needs to be rebased to proceed (conflicts, wrong branch...) label Jul 30, 2020
@ridz1208 ridz1208 changed the base branch from 23.0-release to main July 30, 2020 18:37
@ridz1208
Copy link
Collaborator Author

@driusan nevermind, it was added in 23

@driusan
Copy link
Collaborator

driusan commented Aug 3, 2020

@ridz1208 can this be merged? It still has the Needs Rebase tag but your latest comment suggests that's not true?

@ridz1208 ridz1208 removed the State: Needs rebase PR that needs to be rebased to proceed (conflicts, wrong branch...) label Aug 5, 2020
@ridz1208
Copy link
Collaborator Author

ridz1208 commented Aug 5, 2020

@driusan yes, sorry forgot to remove the label

@driusan driusan merged commit 6b3fb2c into aces:main Aug 5, 2020
@ridz1208 ridz1208 added this to the 24.0.0 milestone Aug 6, 2020
spell00 pushed a commit to spell00/Loris that referenced this pull request Aug 13, 2020
Fix for error:

```
PHP Fatal error: Uncaught TypeError: Argument 4 passed to Candidate::createNew() must be an instance of LORIS\\StudyEntities\\Candidate\\Sex, string given, called in /var/www/loris/modules/api/php/endpoints/candidates.class.inc on line 213
```

while POSTing to API to create a candidate.
AlexandraLivadas pushed a commit to AlexandraLivadas/Loris that referenced this pull request Jun 15, 2021
Fix for error:

```
PHP Fatal error: Uncaught TypeError: Argument 4 passed to Candidate::createNew() must be an instance of LORIS\\StudyEntities\\Candidate\\Sex, string given, called in /var/www/loris/modules/api/php/endpoints/candidates.class.inc on line 213
```

while POSTing to API to create a candidate.
AlexandraLivadas pushed a commit to AlexandraLivadas/Loris that referenced this pull request Jun 29, 2021
Fix for error:

```
PHP Fatal error: Uncaught TypeError: Argument 4 passed to Candidate::createNew() must be an instance of LORIS\\StudyEntities\\Candidate\\Sex, string given, called in /var/www/loris/modules/api/php/endpoints/candidates.class.inc on line 213
```

while POSTing to API to create a candidate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Bug PR or issue that aims to report or fix a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants