Skip to content

IMAP: Fix UNKNOWN default values #6179

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

Closed
wants to merge 6 commits into from

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Sep 21, 2020

A went and did a bit of refactoring at the same time to make this easier to implement.

@nikic
Copy link
Member

nikic commented Sep 22, 2020

AppVeyor build fails:

ext\imap\php_imap.c(3446): error C2088: '&&': illegal for struct
ext\imap\php_imap.c(3475): error C2088: '&&': illegal for struct
ext\imap\php_imap.c(3504): error C2088: '&&': illegal for struct
ext\imap\php_imap.c(3530): error C2088: '&&': illegal for struct

Copy link
Member

@nikic nikic left a comment

Choose a reason for hiding this comment

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

Assuming the build is happy, this looks good to me.

@@ -2678,7 +2677,7 @@ PHP_FUNCTION(imap_sort)
mypgm->function = (short) pgm;
mypgm->next = NIL;

slst = mail_sort(imap_le_struct->imap_stream, (argc == 6 ? ZSTR_VAL(charset) : NIL), spg, mypgm, (argc >= 4 ? flags : NIL));
slst = mail_sort(imap_le_struct->imap_stream, (charset ? ZSTR_VAL(charset) : NIL), spg, mypgm, (argc >= 4 ? flags : NIL));
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
slst = mail_sort(imap_le_struct->imap_stream, (charset ? ZSTR_VAL(charset) : NIL), spg, mypgm, (argc >= 4 ? flags : NIL));
slst = mail_sort(imap_le_struct->imap_stream, (charset ? ZSTR_VAL(charset) : NIL), spg, mypgm, flags;

to remove argc dependency. NIL is defined as 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants