Skip to content

Commit a37f60f

Browse files
committed
php 5.3 compatibility fix
1 parent aaf59ac commit a37f60f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/PhpWord/TemplateProcessor.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -366,12 +366,12 @@ public function setImageValue($search, $replace, $limit = self::MAXIMUM_REPLACEM
366366
$this->tempDocumentNewImages[$imgPath] = $imgName;
367367

368368
// setup type for image
369-
$xmlImageType = str_replace(['{IMG}', '{EXT}'], [$imgName, $imgExt], $typeTpl) ;
369+
$xmlImageType = str_replace(array('{IMG}', '{EXT}'), array($imgName, $imgExt), $typeTpl) ;
370370
$this->tempDocumentContentTypes = str_replace('</Types>', $xmlImageType, $this->tempDocumentContentTypes) . '</Types>';
371371
}
372372

373-
$xmlImage = str_replace(['{RID}', '{WIDTH}', '{HEIGHT}'], [$rid, $width, $height], $imgTpl) ;
374-
$xmlImageRelation = str_replace(['{RID}', '{IMG}'], [$rid, $imgName], $relationTpl);
373+
$xmlImage = str_replace(array('{RID}', '{WIDTH}', '{HEIGHT}'), array($rid, $width, $height), $imgTpl) ;
374+
$xmlImageRelation = str_replace(array('{RID}', '{IMG}'), array($rid, $imgName), $relationTpl);
375375

376376
if (!isset($this->tempDocumentRelations[$partFileName])) {
377377
// create new relations file

0 commit comments

Comments
 (0)