Skip to content

Commit 34276d3

Browse files
authored
Merge pull request #2449 from PHPOffice/pr2415
TemplateProcessor : Fixed choose dimention for Float Value
2 parents c19e038 + a76b045 commit 34276d3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1717
- Word2007 Reader : Read hyperlingks in headings by @hannesdorn in #2433
1818
- PclZip : strtr using empty string by @spl1nes in #2432
1919
- Fixed PHP 8.2 deprecated about Allow access to an undefined property by @DAdq26 in #2440
20+
- Template Processor : Fixed choose dimention for Float Value by @gdevilbat in #2449
2021

2122
### Miscellaneous
2223

src/PhpWord/TemplateProcessor.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ private function chooseImageDimension($baseValue, $inlineValue, $defaultValue)
437437
if (null === $value && isset($inlineValue)) {
438438
$value = $inlineValue;
439439
}
440-
if (!preg_match('/^([0-9]*(cm|mm|in|pt|pc|px|%|em|ex|)|auto)$/i', $value ?? '')) {
440+
if (!preg_match('/^([0-9.]*(cm|mm|in|pt|pc|px|%|em|ex|)|auto)$/i', $value ?? '')) {
441441
$value = null;
442442
}
443443
if (null === $value) {

0 commit comments

Comments
 (0)