Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add null check when setComplexValue is not found #1936

Merged
merged 3 commits into from
Feb 5, 2021

Conversation

YannikFirre
Copy link
Contributor

Description

Fix when setComplexValue is not found in the template.

@@ -274,6 +274,11 @@ public function setComplexValue($search, \PhpOffice\PhpWord\Element\AbstractElem
$elementWriter->write();

$where = $this->findContainingXmlBlockForMacro($search, 'w:r');

if($where === false) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix missing space after if (see travis check)

Copy link
Contributor Author

@YannikFirre YannikFirre Dec 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@troosan It's done :)

@troosan troosan added the Status: Waiting for feedback Question has been asked, waiting for response from PR author label Dec 29, 2020
@troosan troosan changed the title FIX - When setComplexValue is not found Add null check when setComplexValue is not found Dec 29, 2020
@troosan troosan added this to the v0.18.0 milestone Dec 31, 2020
@troosan troosan merged commit 8922632 into PHPOffice:develop Feb 5, 2021
@troosan troosan added Template Processor and removed Status: Waiting for feedback Question has been asked, waiting for response from PR author labels Feb 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants