* Mergeprint: fixed not working merge (white screen, nothing in error-log) under PHP 5.2.6

Catchable fatal error: argument 1 to transformToXml() must be of type DOMDocument
This commit is contained in:
Ralf Becker 2011-11-16 09:26:23 +00:00
parent 9fad5b84ab
commit 978b014ffc

View File

@ -523,8 +523,11 @@ abstract class bo_merge
{ {
try try
{ {
$element = new SimpleXMLelement($content); // does NOT work with php 5.2.6: Catchable fatal error: argument 1 to transformToXml() must be of type DOMDocument
$content = @$xslt->transformToXml($element); //$element = new SimpleXMLelement($content);
$element = new DOMDocument('1.0', 'utf-8');
$element->loadXML($content);
$content = $xslt->transformToXml($element);
//echo $content;die(); //echo $content;die();
// Word 2003 needs two declarations, add extra declaration back in // Word 2003 needs two declarations, add extra declaration back in
@ -540,7 +543,7 @@ abstract class bo_merge
} }
catch (Exception $e) catch (Exception $e)
{ {
error_log($e); error_log($e->getMessage());
// Failed... // Failed...
} }
} }