Do not try to read document protection if not present

This commit is contained in:
troosan 2018-05-20 14:37:59 +02:00
parent 94be56b0ec
commit 453ddf078b
2 changed files with 5 additions and 1 deletions

View File

@ -588,6 +588,8 @@ abstract class AbstractPart
return $possibleAttribute;
}
}
return null;
}
return $attributes;

View File

@ -109,8 +109,10 @@ class Settings extends AbstractPart
$documentProtection = $phpWord->getSettings()->getDocumentProtection();
$edit = $xmlReader->getAttribute('w:edit', $node);
if ($edit !== null) {
$documentProtection->setEditing($edit);
}
}
/**
* Sets the proof state