]> granicus.if.org Git - php/commitdiff
fixing imap_undelete to accept 2 or 3 arguments, not 3 or 4.
authorChuck Hagenbuch <chagenbu@php.net>
Sat, 26 Feb 2000 06:58:15 +0000 (06:58 +0000)
committerChuck Hagenbuch <chagenbu@php.net>
Sat, 26 Feb 2000 06:58:15 +0000 (06:58 +0000)
ext/imap/imap.c

index f9135adc36c3911442e135f9f01f27719300c734..38ba37adea99849b75bf47dbde19c0cc90ff6e9e 100644 (file)
@@ -1573,7 +1573,7 @@ PHP_FUNCTION(imap_undelete)
        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;
        }
        convert_to_long(streamind);
@@ -1587,7 +1587,7 @@ PHP_FUNCTION(imap_undelete)
                RETURN_FALSE;
        }
 
-       mail_clearflag_full(imap_le_struct->imap_stream,sequence->value.str.val,"\\DELETED",myargc == 4 ? flags->value.lval : NIL);
+       mail_clearflag_full(imap_le_struct->imap_stream,sequence->value.str.val,"\\DELETED",myargc == 3 ? flags->value.lval : NIL);
        RETVAL_TRUE;
 }
 /* }}} */