diff options
author | Pierre Joye <pajoye@php.net> | 2009-12-22 14:57:57 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2009-12-22 14:57:57 +0000 |
commit | 9309f2bf64a206aa0c19965d906fb83f11ba9ba0 (patch) | |
tree | 9630b246ced34e26946d8540d82dae1eabbf43c6 /ext/imap | |
parent | 294401cfa056eef6dcb6ff2d0f73254396e567be (diff) | |
download | php-git-9309f2bf64a206aa0c19965d906fb83f11ba9ba0.tar.gz |
- fix build and warning (introduced by my last commit)
Diffstat (limited to 'ext/imap')
-rw-r--r-- | ext/imap/php_imap.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index b255999a34..cc9d7d1d0e 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -1276,19 +1276,18 @@ PHP_FUNCTION(imap_append) int folder_len, message_len, internal_date_len = 0, flags_len = 0; pils *imap_le_struct; STRING st; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rss|ss", &streamind, &folder, &folder_len, &message, &message_len, &flags, &flags_len, &internal_date, &internal_date_len) == FAILURE) { - return; - } - char* regex = "/[0-3][0-9]-((Jan)|(Feb)|(Mar)|(Apr)|(May)|(Jun)|(Jul)|(Aug)|(Sep)|(Oct)|(Nov)|(Dec))-[0-9]{4} [0-2][0-9]:[0-5][0-9]:[0-5][0-9] [+-][0-9]{4}/"; - int regex_len = strlen(regex); + const int regex_len = strlen(regex); pcre_cache_entry *pce; /* Compiled regex */ zval *subpats = NULL; /* Parts (not used) */ long regex_flags = 0; /* Flags (not used) */ long start_offset = 0; /* Start offset (not used) */ int global = 0; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rss|ss", &streamind, &folder, &folder_len, &message, &message_len, &flags, &flags_len, &internal_date, &internal_date_len) == FAILURE) { + return; + } + if (internal_date) { /* Make sure the given internal_date string matches the RFC specifiedformat */ if ((pce = pcre_get_compiled_regex_cache(regex, regex_len TSRMLS_CC))== NULL) { |