aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-09-10 03:14:00 -0700
committerFriendika <info@friendika.com>2011-09-10 03:14:00 -0700
commit0c0a60439648c1ab0980cb309a73a3dd7e96eeb9 (patch)
tree5b668649b73e2bdddf4e0d9c6f8e3ca2b76bcfd7
parentebb9af8946b68a545d9a7b5a6763721627a981f7 (diff)
downloadvolse-hubzilla-0c0a60439648c1ab0980cb309a73a3dd7e96eeb9.tar.gz
volse-hubzilla-0c0a60439648c1ab0980cb309a73a3dd7e96eeb9.tar.bz2
volse-hubzilla-0c0a60439648c1ab0980cb309a73a3dd7e96eeb9.zip
block imap function from spitting out errors to the page
-rw-r--r--include/email.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/include/email.php b/include/email.php
index 1f485e430..a36d9adab 100644
--- a/include/email.php
+++ b/include/email.php
@@ -4,7 +4,7 @@ function email_connect($mailbox,$username,$password) {
if(! function_exists('imap_open'))
return false;
- $mbox = imap_open($mailbox,$username,$password);
+ $mbox = @imap_open($mailbox,$username,$password);
return $mbox;
}
@@ -14,19 +14,19 @@ function email_poll($mbox,$email_addr) {
if(! ($mbox && $email_addr))
return array();
- $search1 = imap_search($mbox,'FROM "' . $email_addr . '"', SE_UID);
+ $search1 = @imap_search($mbox,'FROM "' . $email_addr . '"', SE_UID);
if(! $search1)
$search1 = array();
- $search2 = imap_search($mbox,'TO "' . $email_addr . '"', SE_UID);
+ $search2 = @imap_search($mbox,'TO "' . $email_addr . '"', SE_UID);
if(! $search2)
$search2 = array();
- $search3 = imap_search($mbox,'CC "' . $email_addr . '"', SE_UID);
+ $search3 = @imap_search($mbox,'CC "' . $email_addr . '"', SE_UID);
if(! $search3)
$search3 = array();
- $search4 = imap_search($mbox,'BCC "' . $email_addr . '"', SE_UID);
+ $search4 = @imap_search($mbox,'BCC "' . $email_addr . '"', SE_UID);
if(! $search4)
$search4 = array();
@@ -45,12 +45,12 @@ function construct_mailbox_name($mailacct) {
function email_msg_meta($mbox,$uid) {
- $ret = (($mbox && $uid) ? imap_fetch_overview($mbox,$uid,FT_UID) : array(array()));
+ $ret = (($mbox && $uid) ? @imap_fetch_overview($mbox,$uid,FT_UID) : array(array()));
return ((count($ret)) ? $ret[0] : array());
}
function email_msg_headers($mbox,$uid) {
- $raw_header = (($mbox && $uid) ? imap_fetchheader($mbox,$uid,FT_UID) : '');
+ $raw_header = (($mbox && $uid) ? @imap_fetchheader($mbox,$uid,FT_UID) : '');
$raw_header = str_replace("\r",'',$raw_header);
$ret = array();
$h = split("\n",$raw_header);
@@ -74,7 +74,7 @@ function email_msg_headers($mbox,$uid) {
function email_get_msg($mbox,$uid) {
$ret = array();
- $struc = (($mbox && $uid) ? imap_fetchstructure($mbox,$uid,FT_UID) : null);
+ $struc = (($mbox && $uid) ? @imap_fetchstructure($mbox,$uid,FT_UID) : null);
if(! $struc)
return $ret;
@@ -103,8 +103,8 @@ function email_get_part($mbox,$uid,$p,$partno) {
// DECODE DATA
$data = ($partno)
- ? imap_fetchbody($mbox,$uid,$partno, FT_UID|FT_PEEK)
- : imap_body($mbox,$uid,FT_UID|FT_PEEK);
+ ? @imap_fetchbody($mbox,$uid,$partno, FT_UID|FT_PEEK)
+ : @imap_body($mbox,$uid,FT_UID|FT_PEEK);
// Any part may be encoded, even plain text messages, so check everything.
if ($p->encoding==4)