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

Wrong macro on nullable value #2186

Closed
Jeckerson opened this issue Apr 4, 2021 · 0 comments · Fixed by #2197
Closed

Wrong macro on nullable value #2186

Jeckerson opened this issue Apr 4, 2021 · 0 comments · Fixed by #2197
Assignees
Labels
Milestone

Comments

@Jeckerson
Copy link
Member

After this fix was merged - #2180
Now it seems that there are still situations when Zephir try to compare null value as a string.

Example:

public function setStatusCode(int code, string message = null) -> <ResponseInterface>

if message === null {

Produced C code:

if (ZEPHIR_IS_STRING_IDENTICAL(&message, "")) {
@Jeckerson Jeckerson added the bug label Apr 4, 2021
@Jeckerson Jeckerson added this to the 0.13.2 milestone Apr 4, 2021
@Jeckerson Jeckerson self-assigned this Apr 7, 2021
Jeckerson added a commit that referenced this issue Apr 7, 2021
Jeckerson added a commit that referenced this issue Apr 7, 2021
Jeckerson added a commit that referenced this issue Apr 7, 2021
@Jeckerson Jeckerson linked a pull request Apr 7, 2021 that will close this issue
3 tasks
Jeckerson added a commit that referenced this issue Apr 7, 2021
Jeckerson added a commit that referenced this issue Apr 7, 2021
Jeckerson added a commit that referenced this issue Apr 8, 2021
AlexNDRmac added a commit that referenced this issue Apr 10, 2021
#2186 - Change empty string check from `IS_UNDEF` to `ZEPHIR_IS_EMPTY`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant