X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FProtocol%2FEmail.php;h=4c6ac9cb4d5023fafe1422db553e02645eb8ea1d;hb=88e339a43d24ca23e246f128bac4305be4cc7e17;hp=75845184492da2595553c5693de10928ad2f2882;hpb=d9d30c7b063c7a11586a11da0e8ef5d4239d254a;p=friendica.git diff --git a/src/Protocol/Email.php b/src/Protocol/Email.php index 7584518449..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 : []; } @@ -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));