[doc-base] check-ci-without-jing: minor code cleanup

From: Date: Fri, 24 Jul 2026 13:52:47 +0000
Subject: [doc-base] check-ci-without-jing: minor code cleanup
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-23489@lists.php.net to get a copy of this message
Author: Jordi Kroon (jordikroon) Date: 2026-07-24T15:52:39+02:00 Commit: https://github.com/php/doc-base/commit/555018e00be4ca3f471d2e3799dc0a7901488053 Raw diff: https://github.com/php/doc-base/commit/555018e00be4ca3f471d2e3799dc0a7901488053.diff minor code cleanup Changed paths: M configure.php Diff: diff --git a/configure.php b/configure.php index 2cba6feee2..fe7f54042d 100755 --- a/configure.php +++ b/configure.php @@ -429,8 +429,8 @@ function find_xml_files($path) // {{{ break; case 'jing': - if (!in_array($v, ['auto', 'yes', 'no'])) { - errbox("Invalid value for --with-jing: {$v} (expected auto, yes or no)"); + if (!in_array($v, ['auto', 'yes', 'no'], true)) { + errbox("Invalid value for --with-jing: $v (expected auto, yes or no)"); errors_are_bad(1); } $ac['JING'] = $v; @@ -1002,15 +1002,13 @@ function xml_validate( $dom ) $jing = $GLOBALS['ac']['JING']; - if ( $jing == 'auto' ) + if ( $jing === 'auto' ) { - $out = null; - $ret = null; exec( "java -version 2>&1" , $out , $ret ); - $jing = $ret == 0 ? 'yes' : 'no'; + $jing = $ret === 0 ? 'yes' : 'no'; } - if ( $jing == 'yes' ) + if ( $jing === 'yes' ) xml_validate_jing(); else xml_validate_libxml( $dom ); @@ -1023,8 +1021,6 @@ function xml_validate_jing() echo "Validating temp/manual.xml (jing)... "; - $out = null; - $ret = null; $schema = RNG_SCHEMA_FILE; $cmdJing = "java -Djdk.xml.totalEntitySizeLimit=300000 -jar {$srcdir}/docbook/jing.jar {$schema} {$idempath}"; exec( $cmdJing , $out , $ret ); @@ -1032,7 +1028,7 @@ function xml_validate_jing() if ( ! is_array( $out ) ) $out = []; - if ( $ret == 0 ) + if ( !$ret ) { echo "done.\n"; return;

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