File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -99,13 +99,13 @@ private function getRootNode( DOMDocument $document ) {
9999 throw new Exception ( 'Empty document ' );
100100 }
101101
102- $ rootNodes = $ document ->documentElement ->childNodes -> item ( 0 ) ->childNodes ;
102+ $ rootNodes = $ document ->documentElement ->childNodes [ 0 ] ->childNodes ;
103103
104104 if ( $ rootNodes ->length > 1 ) {
105105 throw new Exception ( 'Template should have only one root node ' );
106106 }
107107
108- return $ rootNodes-> item ( 0 ) ;
108+ return $ rootNodes[ 0 ] ;
109109 }
110110
111111 /**
@@ -250,7 +250,7 @@ private function handleFor( DOMNode $node, array $data ) {
250250
251251 private function appendHTML ( DOMNode $ parent , $ source ) {
252252 $ tmpDoc = $ this ->parseHtml ( $ source );
253- foreach ( $ tmpDoc ->getElementsByTagName ( 'body ' )-> item ( 0 ) ->childNodes as $ node ) {
253+ foreach ( $ tmpDoc ->getElementsByTagName ( 'body ' )[ 0 ] ->childNodes as $ node ) {
254254 $ node = $ parent ->ownerDocument ->importNode ( $ node , true );
255255 $ parent ->appendChild ( $ node );
256256 }
You can’t perform that action at this time.
0 commit comments