summaryrefslogtreecommitdiff
path: root/ext/imap/php_imap.c
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-10-12 19:18:03 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2020-10-12 23:10:13 +0200
commit8d4774a2df4e16679c9176e2b6edecc94283af6d (patch)
tree055eb6ee3fa5c45d0240a4f8673b82db5f5fd628 /ext/imap/php_imap.c
parent1c596ff1463a187d0fe135de251fb139b63858bd (diff)
downloadphp-git-8d4774a2df4e16679c9176e2b6edecc94283af6d.tar.gz
Change parameters types from int to bool
These are typical boolean parameters, so we shouldn't advertize them as integers. For the `$reverse` parameter that even fixes expectations, because the `reverse` member is a bitfield of 1 bit, so assigning any even integer would not set it. Closes GH-6328.
Diffstat (limited to 'ext/imap/php_imap.c')
-rw-r--r--ext/imap/php_imap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index 99ded64115..94b84fbe96 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -2700,14 +2700,15 @@ PHP_FUNCTION(imap_sort)
{
zval *streamind;
zend_string *criteria = NULL, *charset = NULL;
- zend_long sort, rev, flags = 0;
+ zend_long sort, flags = 0;
+ zend_bool rev;
pils *imap_le_struct;
unsigned long *slst, *sl;
char *search_criteria;
SORTPGM *mypgm=NIL;
SEARCHPGM *spg=NIL;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "rll|lS!S!", &streamind, &sort, &rev, &flags, &criteria, &charset) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "rlb|lS!S!", &streamind, &sort, &rev, &flags, &criteria, &charset) == FAILURE) {
RETURN_THROWS();
}