@@ -429,8 +429,8 @@ function find_xml_files($path) // {{{
429429 break ;
430430
431431 case 'jing ' :
432- if (!in_array ($ v , ['auto ' , 'yes ' , 'no ' ])) {
433- errbox ("Invalid value for --with-jing: { $ v } (expected auto, yes or no) " );
432+ if (!in_array ($ v , ['auto ' , 'yes ' , 'no ' ], true )) {
433+ errbox ("Invalid value for --with-jing: $ v (expected auto, yes or no) " );
434434 errors_are_bad (1 );
435435 }
436436 $ ac ['JING ' ] = $ v ;
@@ -1002,15 +1002,13 @@ function xml_validate( $dom )
10021002
10031003 $ jing = $ GLOBALS ['ac ' ]['JING ' ];
10041004
1005- if ( $ jing == 'auto ' )
1005+ if ( $ jing === 'auto ' )
10061006 {
1007- $ out = null ;
1008- $ ret = null ;
10091007 exec ( "java -version 2>&1 " , $ out , $ ret );
1010- $ jing = $ ret == 0 ? 'yes ' : 'no ' ;
1008+ $ jing = $ ret === 0 ? 'yes ' : 'no ' ;
10111009 }
10121010
1013- if ( $ jing == 'yes ' )
1011+ if ( $ jing === 'yes ' )
10141012 xml_validate_jing ();
10151013 else
10161014 xml_validate_libxml ( $ dom );
@@ -1023,16 +1021,14 @@ function xml_validate_jing()
10231021
10241022 echo "Validating temp/manual.xml (jing)... " ;
10251023
1026- $ out = null ;
1027- $ ret = null ;
10281024 $ schema = RNG_SCHEMA_FILE ;
10291025 $ cmdJing = "java -Djdk.xml.totalEntitySizeLimit=300000 -jar {$ srcdir }/docbook/jing.jar {$ schema } {$ idempath }" ;
10301026 exec ( $ cmdJing , $ out , $ ret );
10311027
10321028 if ( ! is_array ( $ out ) )
10331029 $ out = [];
10341030
1035- if ( $ ret == 0 )
1031+ if ( ! $ ret )
10361032 {
10371033 echo "done. \n" ;
10381034 return ;
0 commit comments