mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 08:53:37 +01:00
fix PHP 8.0 TypeError: fwrite(): Argument #2 ($data) must be of type string, array given
This commit is contained in:
parent
c6052a5fbb
commit
c212cf36ae
@ -5574,12 +5574,12 @@ class Mail
|
||||
* @param string/int $_partID = '' , the partID, may be omitted
|
||||
* @param string $_folder folder to work on
|
||||
* @param boolean $_stream =false true: return a stream, false: return string, stream suppresses any caching
|
||||
* @return string the message body
|
||||
* @return ?string the message body or null if $_uid or $_partID not found
|
||||
*/
|
||||
function getMessageRawBody($_uid, $_partID = '', $_folder='', $_stream=false)
|
||||
{
|
||||
static $rawBody;
|
||||
$body = [];
|
||||
$body = null;
|
||||
if (empty($_folder)) $_folder = $this->sessionData['mailbox']?: $this->icServer->getCurrentMailbox();
|
||||
$_uid = !(is_object($_uid) || is_array($_uid)) ? (array)$_uid : $_uid;
|
||||
|
||||
|
@ -2965,7 +2965,7 @@ $filter['before']= date("d-M-Y", $cutoffdate2);
|
||||
$file = $tmp_file;
|
||||
}
|
||||
|
||||
if (!($fp = Vfs::fopen($file,'wb')) || !fwrite($fp,$message))
|
||||
if (!is_string($message) || !($fp = Vfs::fopen($file,'wb')) || !fwrite($fp,$message))
|
||||
{
|
||||
$res['msg'] = lang('Error saving %1!',$file);
|
||||
$res['success'] = false;
|
||||
|
Loading…
Reference in New Issue
Block a user