We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I ran into this issue running unit tests against my API - using the loosely-typed comparison opereator != resulted in some weird behavior:
!=
if($offset != null) { $queryParams['offset'] = $this->apiClient->toQueryValue($offset); }
The problem here is that the $offset can have a value of 0, but this check will skip quoting of this value.
$offset
This resulted in the API call failing on a SQL statement that instead inserted NULL as the quoted value.
NULL
Is there any reason why the template doesn't use the safe comparison operator? See:
https://github.com/wordnik/swagger-codegen/blob/master/src/main/resources/php/api.mustache
The text was updated successfully, but these errors were encountered:
fix for #224, added safe php comparison
fde5014
No branches or pull requests
I ran into this issue running unit tests against my API - using the loosely-typed comparison opereator
!=
resulted in some weird behavior:The problem here is that the
$offset
can have a value of 0, but this check will skip quoting of this value.This resulted in the API call failing on a SQL statement that instead inserted
NULL
as the quoted value.Is there any reason why the template doesn't use the safe comparison operator? See:
https://github.com/wordnik/swagger-codegen/blob/master/src/main/resources/php/api.mustache
The text was updated successfully, but these errors were encountered: