File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1012,19 +1012,28 @@ function xml_validate_jing()
10121012 $ cmdJing = "java -Djdk.xml.totalEntitySizeLimit=300000 -jar {$ srcdir }/docbook/jing.jar {$ schema } {$ idempath }" ;
10131013 exec ( $ cmdJing , $ out , $ ret );
10141014
1015+ if ( ! is_array ( $ out ) )
1016+ $ out = [];
1017+
10151018 if ( $ ret == 0 )
10161019 {
10171020 echo "done. \n" ;
10181021 return ;
10191022 }
1020- else
1021- {
1022- echo "failed. \n" ;
1023- if ( is_array ( $ out ) )
1024- foreach ( $ out as $ line )
1025- echo "$ line \n" ;
1023+
1024+ echo "failed. \n" ;
1025+ foreach ( $ out as $ line )
1026+ echo "$ line \n" ;
1027+
1028+ // Allow translations with missing/mismatched IDREFs to continue building.
1029+
1030+ $ countFatal = count ( $ out );
1031+ foreach ( $ out as $ line )
1032+ if ( preg_match ( '/IDREF "[^"]+" without matching ID/ ' , $ line ) )
1033+ $ countFatal --;
1034+
1035+ if ( $ GLOBALS ['ac ' ]['LANG ' ] === 'en ' || $ countFatal > 0 )
10261036 errors_are_bad ( 1 );
1027- }
10281037}
10291038
10301039function xml_validate_libxml ( $ dom )
You can’t perform that action at this time.
0 commit comments