File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -768,11 +768,17 @@ public function parseE(\DOMElement $e) {
768768 $ html .= $ node ->ownerDocument ->saveHTML ($ node );
769769 }
770770
771- return array (
771+ $ return = array (
772772 'html ' => $ html ,
773773 'value ' => unicodeTrim ($ this ->innerText ($ e )),
774- 'html-lang ' => $ this ->language ($ e )
775774 );
775+
776+ // Language
777+ if ( $ html_lang = $ this ->language ($ e ) ) {
778+ $ return ['html-lang ' ] = $ html_lang ;
779+ }
780+
781+ return $ return ;
776782 }
777783
778784 private function removeTags (\DOMElement &$ e , $ tagName ) {
@@ -1031,7 +1037,9 @@ public function parseH(\DOMElement $e) {
10311037 }
10321038
10331039 // Language
1034- $ return ['html-lang ' ] = $ this ->language ($ e );
1040+ if ( $ html_lang = $ this ->language ($ e ) ) {
1041+ $ return ['html-lang ' ] = $ html_lang ;
1042+ }
10351043
10361044 // Make sure things are in alphabetical order
10371045 sort ($ mfTypes );
You can’t perform that action at this time.
0 commit comments