diff --git a/src/MAPI/OLE/Pear/DocumentElement.php b/src/MAPI/OLE/Pear/DocumentElement.php index ffaf205..ad23b76 100644 --- a/src/MAPI/OLE/Pear/DocumentElement.php +++ b/src/MAPI/OLE/Pear/DocumentElement.php @@ -187,7 +187,7 @@ public function saveToStream($stream) // nasty Pear_OLE actually writes out a temp file and fpassthru's on it. Yuck. // so let's give a wrapped stream which ignores Pear_OLE's fopen() and fclose() - $wrappedStreamUrl = StreamWrapper::wrapStream($stream); + $wrappedStreamUrl = StreamWrapper::wrapStream($stream, 'r'); $root->save($wrappedStreamUrl); /*ob_start();