Skip to content

Commit 7bbaab3

Browse files
committed
Merge branch 'fix-rare-pclzip-realpath-php-version-issue' of github.com:andrew-kzoo/PHPWord into develop
2 parents 09a143f + d576060 commit 7bbaab3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/PhpWord/Shared/ZipArchive.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,10 @@ public function pclzipAddFile($filename, $localname = null)
218218
{
219219
/** @var \PclZip $zip Type hint */
220220
$zip = $this->zip;
221-
$filename = realpath($filename);
221+
$test_filename = realpath($filename);
222+
if($test_filename !== false) {
223+
$filename = $test_filename;
224+
}
222225
$filenameParts = pathinfo($filename);
223226
$localnameParts = pathinfo($localname);
224227

0 commit comments

Comments
 (0)