From 9de421689de8b2540b33cc6005e371307be4e30f Mon Sep 17 00:00:00 2001 From: stekkel Date: Tue, 27 Aug 2002 17:23:09 +0000 Subject: [PATCH] Added error message in case the bodystructure couldn't processed. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3476 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/mime.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/functions/mime.php b/functions/mime.php index 95732994..83b21bfe 100644 --- a/functions/mime.php +++ b/functions/mime.php @@ -32,6 +32,19 @@ function mime_structure ($bodystructure, $flags=array()) { $read = trim(substr ($read, 0, -1)); $res = $msg->parseStructure($read); $msg = $res[0]; + if (!is_object($msg)) { + include_once( '../functions/display_messages.php' ); + global $color, $mailbox; + displayPageHeader( $color, urldecode($mailbox) ); + echo "\n\n" . + '
'; + $errormessage = _("Squirrelmail could not decode the bodystructure of the message"); + $errormessage .= '
'._("the provided bodystructure by your imap-server").':

'; + $errormessage .= '
'.$read.'
'; + plain_error_message( $errormessage, $color ); + echo ''; + exit; + } $msg->setEnt('0'); if (count($flags)) { foreach ($flags as $flag) { -- 2.25.1