]> granicus.if.org Git - php/commitdiff
prevent mail_criteria from munging the variable passed in containing the
authorChuck Hagenbuch <chagenbu@php.net>
Thu, 17 Aug 2000 16:01:14 +0000 (16:01 +0000)
committerChuck Hagenbuch <chagenbu@php.net>
Thu, 17 Aug 2000 16:01:14 +0000 (16:01 +0000)
query - just had to add a cpystr(). if this isn't the right fix, let me
know, but it does work.

ext/imap/php_imap.c

index 6e79a6b96c39f03ea956a3e5d95270b55742f516..18253c46f459ef67a46df91278f458eb6ff4a75a 100644 (file)
@@ -3411,7 +3411,7 @@ PHP_FUNCTION(imap_search)
        }
        
        IMAPG(imap_messages) = NIL;
-       mail_search_full(imap_le_struct->imap_stream, NIL, mail_criteria(Z_STRVAL_PP(criteria)), flags);
+       mail_search_full(imap_le_struct->imap_stream, NIL, mail_criteria(cpystr(Z_STRVAL_PP(criteria))), flags);
        if (IMAPG(imap_messages) == NIL) {
                RETURN_FALSE;
        }