Skip to content

Commit

Permalink
PHP 8.1 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerKiKi committed Feb 17, 2022
1 parent 01d87e1 commit 3bcd4b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PhpWord/TemplateProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ private function chooseImageDimension($baseValue, $inlineValue, $defaultValue)
if (is_null($value) && isset($inlineValue)) {
$value = $inlineValue;
}
if (!preg_match('/^([0-9]*(cm|mm|in|pt|pc|px|%|em|ex|)|auto)$/i', $value)) {
if (!preg_match('/^([0-9]*(cm|mm|in|pt|pc|px|%|em|ex|)|auto)$/i', isset($value) ? $value : '')) {
$value = null;
}
if (is_null($value)) {
Expand Down

0 comments on commit 3bcd4b5

Please sign in to comment.