X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FEmail.php;h=4c6ac9cb4d5023fafe1422db553e02645eb8ea1d;hb=88f21c5892f26cfa18c59c7cba22005b1c3bc55c;hp=042fca26d65109e17b91622fd9ce5918fe41cd96;hpb=e3aed8099c1605e1b15b70f74b94540f4512c829;p=friendica.git diff --git a/src/Protocol/Email.php b/src/Protocol/Email.php index 042fca26d6..4c6ac9cb4d 100644 --- a/src/Protocol/Email.php +++ b/src/Protocol/Email.php @@ -1,6 +1,6 @@ array(array()) is probably redundant now + $ret = (($mbox && $sequence) ? @imap_fetch_overview($mbox, $sequence, FT_UID) : [[]]); // POSSIBLE CLEANUP --> array(array()) is probably redundant now return (count($ret)) ? $ret : []; } @@ -221,7 +221,7 @@ class Email * @param string $subtype sub type * @return string */ - private static function messageGetPart($mbox, int $uid, $p, in $partno, string $subtype): string + private static function messageGetPart($mbox, int $uid, $p, int $partno, string $subtype): string { // $partno = '1', '2', '2.1', '2.1.3', etc for multipart, 0 if simple global $htmlmsg,$plainmsg,$charset,$attachments; @@ -296,6 +296,7 @@ class Email } return $x; } + return ''; } /** @@ -569,9 +570,9 @@ class Email * Removes signature from message * * @param string $message Unfiltered message - * @return string Message with no signature + * @return array Message array with no signature (elements "body" and "sig") */ - private static function removeSig(string $message): string + private static function removeSig(string $message): array { $sigpos = strrpos($message, "\n-- \n"); $quotepos = strrpos($message, "[/quote]"); @@ -662,7 +663,7 @@ class Email return implode("\n", $lines); } - private static function convertQuote(strng $body, string $reply): string + private static function convertQuote(string $body, string $reply): string { // Convert Quotes $arrbody = explode("\n", trim($body));