]> granicus.if.org Git - php/commitdiff
fixing imap_delete. All of the argcount checks were against one integer too
authorChuck Hagenbuch <chagenbu@php.net>
Fri, 18 Feb 2000 01:56:01 +0000 (01:56 +0000)
committerChuck Hagenbuch <chagenbu@php.net>
Fri, 18 Feb 2000 01:56:01 +0000 (01:56 +0000)
high.

ext/imap/imap.c

index ac60283d93ba8fcab3e2ffe879e2771d98adc0e7..d3edfebd746c493d8ac05f0f281030fdb9e10440 100644 (file)
@@ -1544,7 +1544,7 @@ PHP_FUNCTION(imap_delete)
        pils *imap_le_struct;
        int myargc=ARG_COUNT(ht);
 
-       if ( myargc < 3 || myargc > 4 || getParameters(ht,myargc,&streamind,&sequence,&flags) == FAILURE) {
+       if (myargc < 2 || myargc > 3 || getParameters(ht,myargc,&streamind,&sequence,&flags) == FAILURE) {
                WRONG_PARAM_COUNT;
        }
 
@@ -1559,7 +1559,7 @@ PHP_FUNCTION(imap_delete)
                RETURN_FALSE;
        }
 
-       mail_setflag_full(imap_le_struct->imap_stream,sequence->value.str.val,"\\DELETED",myargc == 4 ? flags->value.lval : NIL);
+       mail_setflag_full(imap_le_struct->imap_stream,sequence->value.str.val, "\\DELETED", myargc == 3 ? flags->value.lval : NIL);
        RETVAL_TRUE;
 }
 /* }}} */