Skip to content

Commit fc7b822

Browse files
author
André L F S Bacci
committed
Post check individual XML files for know issues
1 parent 4e24cd6 commit fc7b822

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

configure.php

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -720,9 +720,28 @@ function dom_saveload( DOMDocument $dom , string $filename = "" ) : string
720720
{
721721
echo "failed.\n";
722722
print_xml_errors();
723+
individual_xml_broken_check();
723724
errors_are_bad(1);
724725
}
725726

727+
function individual_xml_broken_check()
728+
{
729+
$cmd = array();
730+
$cmd[] = $GLOBALS['ac']['PHP'];
731+
$cmd[] = __DIR__ . "/scripts/broken.php";
732+
$cmd[] = $GLOBALS['ac']['LANG'];
733+
foreach ( $cmd as & $part )
734+
$part = escapeshellarg( $part );
735+
$ret = 0;
736+
$cmd = implode( ' ' , $cmd );
737+
passthru( $cmd , $ret );
738+
if ( $ret != 0 )
739+
{
740+
echo "doc-base/scripts/broken.php FAILED.\n";
741+
exit( 1 );
742+
}
743+
}
744+
726745
echo "Running XInclude/XPointer... ";
727746

728747
$total = xinclude_run_byid( $dom );
@@ -1171,8 +1190,5 @@ function phd_version()
11711190
11721191
CAT;
11731192

1174-
if (function_exists('proc_nice') && !is_windows()) {
1175-
echo " (Run `nice php $_SERVER[SCRIPT_NAME]` next time!)\n";
1176-
}
1177-
1178-
exit(0); // Tell the shell that this script finished successfully.
1193+
individual_xml_broken_check();
1194+
exit(0); // Finished successfully.

0 commit comments

Comments
 (0)