Skip to content

Commit 94ef913

Browse files
it-spidermanosnard
authored andcommitted
Prevent fatal on empty $mxfileXML #2
[4.2.x] ERM32059 Change-Id: I00b795a8fe0367878d9117794a46aeaf741732e0
1 parent bc59743 commit 94ef913

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/MXDocumentExtractor/Base.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ protected function getDiagramDOM( $mxfileXMLDOM ) {
101101
$inflatedDiagramXML = base64_decode( $b64DiagramXML );
102102
$urlencodedDiagramXML = gzinflate( $inflatedDiagramXML );
103103
$diagramXmlString = urldecode( $urlencodedDiagramXML );
104+
if ( empty( $diagramXmlString ) ) {
105+
return null;
106+
}
104107
$documentXML = new DOMDocument();
105108
$documentXML->loadXML( $diagramXmlString );
106109

0 commit comments

Comments
 (0)