]> granicus.if.org Git - php/commitdiff
Fixed build
authorIlia Alshanetsky <iliaa@php.net>
Tue, 23 Jun 2009 12:43:10 +0000 (12:43 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 23 Jun 2009 12:43:10 +0000 (12:43 +0000)
ext/imap/php_imap.c

index 24111e139923061ae1073c5f666ebb65bc1bbe33..a5b2dc90686966a79706bc224f8bd46841164a83 100644 (file)
@@ -2670,7 +2670,7 @@ PHP_FUNCTION(imap_sort)
 
        slst = mail_sort(imap_le_struct->imap_stream, (myargc == 6 ? Z_STRVAL_PP(charset) : NIL), spg, mypgm, (myargc >= 4 ? Z_LVAL_PP(flags) : NIL));
 
-       if (spg && !(flags & SE_FREE)) {
+       if (spg && myargc >= 4 && !(Z_LVAL_PP(flags) & SE_FREE)) {
                mail_free_searchpgm(&spg);
        }