Commit ea4c8049 authored by Sebastian Kummer's avatar Sebastian Kummer

ZP-843 Fixed warnings that $stream was boolean instead of ressource.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 7f31028e
......@@ -2458,10 +2458,11 @@ class MAPIProvider {
if (function_exists("mapi_inetmapi_imtoinet")) {
$addrbook = $this->getAddressbook();
$stream = mapi_inetmapi_imtoinet($this->session, $addrbook, $mapimessage, array('use_tnef' => -1));
if (isset($stream)) {
$mstreamstat = mapi_stream_stat($stream);
$streamsize = $mstreamstat["cb"];
if (isset($stream) && isset($streamsize)) {
if (isset($streamsize)) {
if (Request::GetProtocolVersion() >= 12.0) {
if (!isset($message->asbody))
$message->asbody = new SyncBaseBody();
......@@ -2477,9 +2478,8 @@ class MAPIProvider {
unset($message->body, $message->bodytruncated);
return true;
}
else {
ZLog::Write(LOGLEVEL_ERROR, sprintf("MAPIProvider->imtoinet(): got no stream or content from mapi_inetmapi_imtoinet()"));
}
ZLog::Write(LOGLEVEL_ERROR, sprintf("MAPIProvider->imtoinet(): got no stream or content from mapi_inetmapi_imtoinet()"));
}
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment