Wrong file pointer at mime_parser.php
Posted: Wed Apr 13, 2022 10:53 pm
Script URL: inc/mail/mime_parser.php
Version of script: 3.2.5
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Write your message below:
In function ReadMessageBody line 2075 "fclose($stream);" uses a wrong file pointer. Must be $file.
I found the bug because I had a mail that the parser, when reading the cache file, opened but couldn't do the fread. With file_get_contents it can open and read. Does anyone have any idea what the problem could be?
Version of script: 3.2.5
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Write your message below:
In function ReadMessageBody line 2075 "fclose($stream);" uses a wrong file pointer. Must be $file.
Code: Select all
Function ReadMessageBody($message, &$body, $prefix)
{
if(IsSet($message[$prefix]))
$body = $message[$prefix];
elseif(IsSet($message[$prefix.'File']))
{
$path = $message[$prefix.'File'];
if(!($file = @fopen($path, 'rb')))
return($this->SetPHPError('could not open the message body file '.$path));
for($body = '', $end = 0;!$end;)
{
if(!($data = @fread($file, $this->message_buffer_length)))
{
$this->SetPHPError('Could not open the message body file '.$path);
fclose($stream);
return(0);
}
$end=feof($file);
$body.=$data;
}
fclose($file);
}
else
$body = '';
return(1);
}