Hello,
Refferring to topic https://www.phpdocx.com/en/forum/default/topic/1132
I am using the version 5.5 and some variables are not set or misspelled.
Do you have a fixed version for the MultiMerge.inc file?
Best regards,
Sébastien
Hello,
Refferring to topic https://www.phpdocx.com/en/forum/default/topic/1132
I am using the version 5.5 and some variables are not set or misspelled.
Do you have a fixed version for the MultiMerge.inc file?
Best regards,
Sébastien
Hello,
Each new release of phpdocx adds new features. In the case of MultiMerge, a lot of improvements (options, in-memory merging) has been added to the class since phpdocx 5.5. That PHP notices were removed as well.
If you need a patch for phpdocx 5.5 to remove the PHP notices please reply the topic again and the dev team will post it.
Regards.
Hello,
You can apply this patch to remove that notices in phpdocx 5.5 namespaces (MultiMerge.inc file):
@@ -1947,7 +1947,7 @@
if (is_object($lastNode->firstChild) && $lastNode->firstChild->nodeName == 'w:pPr') {
//check the name of the last child
if (is_object($lastNode->firstChild->lastChild) && $lastNode->firstChild->lastChild->nodeName == 'w:pPrChange') {
- $lastNode->firstChild->lastChild->parentNode->insertBefore($sectNode, $lastParagraph->firstChild->lastChild);
+ $lastNode->firstChild->lastChild->parentNode->insertBefore($sectNode, $lastNode->firstChild->lastChild);
} else {
$lastNode->firstChild->appendChild($sectNode);
}
@@ -2215,6 +2215,7 @@
$mergedRelsNodes = $mergedXPath->query($query);
foreach ($mergedRelsNodes as $node) {
$target = $node->getAttribute('Target');
+ $currentId = $node->getAttribute('Id');
//We are going to filter the CustomXML, glossary and .bin files that we are not going to import by the time being
if (strstr($target, 'customXml') === false &&
strstr($target, 'glossary') === false &&
@@ -2248,7 +2249,7 @@
$queryId = '//rels:Relationship[@Id="' . $currentId . '"]';
$currentIdNodes = $originalXPath->query($queryId);
if ($currentIdNodes->length == 0) {
- $queryId = '//rels:Relationship[@Id="' . $curentId . '"]';
+ $queryId = '//rels:Relationship[@Id="' . $currentId . '"]';
$newRelationshipNode = $myOriginalRels->importNode($node, true);
$myOriginalRels->documentElement->appendChild($newRelationshipNode);
}
Regards.