Do not try to read document protection if not present
This commit is contained in:
parent
94be56b0ec
commit
453ddf078b
|
|
@ -588,6 +588,8 @@ abstract class AbstractPart
|
||||||
return $possibleAttribute;
|
return $possibleAttribute;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $attributes;
|
return $attributes;
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,9 @@ class Settings extends AbstractPart
|
||||||
$documentProtection = $phpWord->getSettings()->getDocumentProtection();
|
$documentProtection = $phpWord->getSettings()->getDocumentProtection();
|
||||||
|
|
||||||
$edit = $xmlReader->getAttribute('w:edit', $node);
|
$edit = $xmlReader->getAttribute('w:edit', $node);
|
||||||
$documentProtection->setEditing($edit);
|
if ($edit !== null) {
|
||||||
|
$documentProtection->setEditing($edit);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue