[doc-base] master: Downgrade IDREF errors to warnings in translations (#303)

From: Date: Fri, 26 Jun 2026 18:07:48 +0000
Subject: [doc-base] master: Downgrade IDREF errors to warnings in translations (#303)
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-23426@lists.php.net to get a copy of this message
Author: Jordi Kroon (jordikroon) Committer: GitHub (web-flow) Pusher: alfsb Date: 2026-06-26T15:07:45-03:00 Commit: https://github.com/php/doc-base/commit/f572f009bfd6113d5b9919f9eb49128ad7fd3bc4 Raw diff: https://github.com/php/doc-base/commit/f572f009bfd6113d5b9919f9eb49128ad7fd3bc4.diff Downgrade IDREF errors to warnings in translations (#303) Changed paths: M configure.php Diff: diff --git a/configure.php b/configure.php index 4b9380c1ff..1a07591639 100755 --- a/configure.php +++ b/configure.php @@ -1012,19 +1012,28 @@ function xml_validate_jing() $cmdJing = "java -Djdk.xml.totalEntitySizeLimit=300000 -jar {$srcdir}/docbook/jing.jar {$schema} {$idempath}"; exec( $cmdJing , $out , $ret ); + if ( ! is_array( $out ) ) + $out = []; + if ( $ret == 0 ) { echo "done.\n"; return; } - else - { - echo "failed.\n"; - if ( is_array( $out ) ) - foreach ( $out as $line ) - echo "$line\n"; + + echo "failed.\n"; + foreach ( $out as $line ) + echo "$line\n"; + + // Allow translations with missing/mismatched IDREFs to continue building. + + $countFatal = count( $out ); + foreach ( $out as $line ) + if ( preg_match( '/IDREF "[^"]+" without matching ID/', $line ) ) + $countFatal--; + + if ( $GLOBALS['ac']['LANG'] === 'en' || $countFatal > 0 ) errors_are_bad( 1 ); - } } function xml_validate_libxml( $dom )

« previous php.doc.cvs (#23426) next »