From 5a7ab6dab8deb8a9ec7f9b05e6e02c22ab089d47 Mon Sep 17 00:00:00 2001 From: Leonardo Lara Rodrigues Date: Sun, 1 Dec 2024 17:11:29 -0300 Subject: [PATCH 1/2] Loop until xinclude() gets 0 includes Workaround for libxml2 < 2.11.0 that apparently do not process nested xincludes. --- configure.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/configure.php b/configure.php index 35b34eba4..a0aff7c6c 100755 --- a/configure.php +++ b/configure.php @@ -775,13 +775,19 @@ function getFileModificationHistory(): array { echo "done.\n"; echo "Running XInclude/XPointer... "; -$status = $dom->xinclude(); +$statusCount = 0; +do { + $status = $dom->xinclude(); + if ($status !== -1) { + // For some dumb reason when no substitution are made it returns false instead of 0... + $status = (int) $status; + $statusCount += $status; + } +} while ($status !== -1 && $status > 0); if ($status === -1) { echo "failed.\n"; } else { - /* For some dumb reason when no substitution are made it returns false instead of 0... */ - $status = (int) $status; - echo "done. Performed $status XIncludes\n"; + echo "done. Performed $statusCount XIncludes\n"; } flush(); From 1b0caef84de0e0a2caf70f6bf47337b517ab6358 Mon Sep 17 00:00:00 2001 From: Leonardo Lara Rodrigues Date: Sun, 1 Dec 2024 17:24:27 -0300 Subject: [PATCH 2/2] debug --- configure.php | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.php b/configure.php index a0aff7c6c..5728645ca 100755 --- a/configure.php +++ b/configure.php @@ -782,6 +782,7 @@ function getFileModificationHistory(): array { // For some dumb reason when no substitution are made it returns false instead of 0... $status = (int) $status; $statusCount += $status; + echo "included $status\n..."; } } while ($status !== -1 && $status > 0); if ($status === -1) {