-
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
[API] Add support for project names with space #7463
[API] Add support for project names with space #7463
Conversation
e4df353
to
19d2c62
Compare
$project_name = isset($pathparts[1]) ? | ||
urldecode($pathparts[1]) : | ||
''; |
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.
$project_name = isset($pathparts[1]) ? | |
urldecode($pathparts[1]) : | |
''; | |
$project_name = urldecode($pathparts[1] ?? ''); |
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.
I made a suggestion. Feel free to include it or not. The null coalesce operator is just a shorter version.
Other than that, all good.
And regarding the unicity of the project name, I think it is a good example of why the generic |
19d2c62
to
05ae90d
Compare
Good suggestion, thanks! |
Handle project names which need to be URL encoded in the API, such as projects with spaces.
Remark: Project names are not designed to be unique in the DB. In case of duplicates, the Project factory fails here (pselectRow used on a query that returns more than one row). (reported in #7464)