[doc-base] check-ci-without-jing: harden jing/java error handling

From: Date: Fri, 24 Jul 2026 18:25:19 +0000
Subject: [doc-base] check-ci-without-jing: harden jing/java error handling
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-23497@lists.php.net to get a copy of this message
Author: Jordi Kroon (jordikroon) Date: 2026-07-24T20:25:11+02:00 Commit: https://github.com/php/doc-base/commit/df6f37512a14b91fba57c36630fe358db32b8a02 Raw diff: https://github.com/php/doc-base/commit/df6f37512a14b91fba57c36630fe358db32b8a02.diff harden jing/java error handling Changed paths: M configure.php Diff: diff --git a/configure.php b/configure.php index 794097f8c1..047299e8c8 100755 --- a/configure.php +++ b/configure.php @@ -1002,9 +1002,14 @@ function xml_validate( $dom ) $jing = $GLOBALS['ac']['JING']; - if ( $jing === 'auto' ) + if ( $jing !== 'no' ) { exec( "java -version 2>&1" , $out , $ret ); + if ( $ret !== 0 && $jing === 'yes' ) + { + errbox( "--with-jing=yes was given, but no working java executable was found." ); + errors_are_bad( 1 ); + } $jing = $ret === 0 ? 'yes' : 'no'; } @@ -1022,7 +1027,7 @@ function xml_validate_jing() echo "Validating temp/manual.xml (jing)... "; $schema = RNG_SCHEMA_FILE; - $cmdJing = "java -Djdk.xml.totalEntitySizeLimit=300000 -jar {$srcdir}/docbook/jing.jar {$schema} {$idempath}"; + $cmdJing = "java -Djdk.xml.totalEntitySizeLimit=300000 -jar {$srcdir}/docbook/jing.jar {$schema} {$idempath} 2>&1"; exec( $cmdJing , $out , $ret ); if ( $ret === 0 )

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