diff options
author | Stanislav Malyshev <stas@php.net> | 2015-01-25 01:21:53 -0800 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2015-01-28 10:15:11 -0800 |
commit | 14d6de97c5f54ec66dbb6b18ebe9cd0d279e4784 (patch) | |
tree | 561eea8ac7b15138bad5c2bfd93c724c03fea955 /ext/imap | |
parent | b7751630d1c50821146fc5732d05ede05ffdee5f (diff) | |
download | php-git-14d6de97c5f54ec66dbb6b18ebe9cd0d279e4784.tar.gz |
add imap
Diffstat (limited to 'ext/imap')
-rw-r--r-- | ext/imap/php_imap.c | 5 | ||||
-rw-r--r-- | ext/imap/tests/imap_fetchstructure_basic.phpt | 10 | ||||
-rw-r--r-- | ext/imap/tests/imap_include.inc | 2 |
3 files changed, 10 insertions, 7 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 0e3ec533a6..ceaa53afcf 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -1235,7 +1235,7 @@ static void php_imap_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent) imap_stream = mail_open(NIL, mailbox->val, flags); if (imap_stream == NIL) { - php_error_docref(NULL, E_WARNING, "Couldn't open stream %s", mailbox); + php_error_docref(NULL, E_WARNING, "Couldn't open stream %s", mailbox->val); efree(IMAPG(imap_user)); IMAPG(imap_user) = 0; efree(IMAPG(imap_password)); IMAPG(imap_password) = 0; RETURN_FALSE; @@ -1340,6 +1340,7 @@ PHP_FUNCTION(imap_append) } } + zend_string_free(regex); ZEND_FETCH_RESOURCE(imap_le_struct, pils *, streamind, -1, "imap", le_imap); INIT (&st, mail_string, (void *) message->val, message->len); @@ -4045,7 +4046,7 @@ PHP_FUNCTION(imap_search) int argc = ZEND_NUM_ARGS(); SEARCHPGM *pgm = NIL; - if (zend_parse_parameters(argc, "rs|lS", &streamind, &criteria, &flags, &charset) == FAILURE) { + if (zend_parse_parameters(argc, "rS|lS", &streamind, &criteria, &flags, &charset) == FAILURE) { return; } diff --git a/ext/imap/tests/imap_fetchstructure_basic.phpt b/ext/imap/tests/imap_fetchstructure_basic.phpt index 7ad4fc5622..dcf6148a1e 100644 --- a/ext/imap/tests/imap_fetchstructure_basic.phpt +++ b/ext/imap/tests/imap_fetchstructure_basic.phpt @@ -1,5 +1,5 @@ --TEST-- -imap_fetchstructure() function : basic functionality +imap_fetchstructure() function : basic functionality --CREDITS-- Olivier Doucet --SKIPIF-- @@ -34,12 +34,13 @@ var_dump($z->type); var_dump($z->encoding); var_dump($z->bytes); var_dump($z->lines); -var_dump(is_object($z->parameters)); +var_dump($z->ifparameters); +var_dump(is_object($z->parameters[0])); imap_close($stream_id); ?> --CLEAN-- -<?php +<?php require_once('clean.inc'); ?> --EXPECTF-- @@ -67,4 +68,5 @@ int(%d) int(%d) int(%d) int(%d) -bool(true)
\ No newline at end of file +int(1) +bool(true) diff --git a/ext/imap/tests/imap_include.inc b/ext/imap/tests/imap_include.inc index b33a10e5e8..110a449cd5 100644 --- a/ext/imap/tests/imap_include.inc +++ b/ext/imap/tests/imap_include.inc @@ -1,6 +1,6 @@ <?php // Change these to make tests run successfully -$server = '{localhost/norsh}'; +$server = '{127.0.0.1/norsh}'; $default_mailbox = $server . "INBOX"; $domain = "something.com"; $admin_user = "webmaster"; // a user with admin access |