Skip to content

Commit 9958a48

Browse files
committed
allow other streams
1 parent b3982eb commit 9958a48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PhpWord/Writer/AbstractWriter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ protected function getTempFile($filename)
220220

221221
// Temporary file
222222
$this->originalFilename = $filename;
223-
if (strtolower($filename) == 'php://output' || strtolower($filename) == 'php://stdout') {
223+
if (strpos(strtolower($filename), 'php://') === 0) {
224224
$filename = tempnam(Settings::getTempDir(), 'PhpWord');
225225
if (false === $filename) {
226226
$filename = $this->originalFilename; // @codeCoverageIgnore

0 commit comments

Comments
 (0)