From f2ed9e8344d8c7c46116e8e4b75a0d1bbeca7c02 Mon Sep 17 00:00:00 2001 From: Tim Schmitz Date: Fri, 26 Jul 2024 13:41:00 +0200 Subject: [PATCH 1/3] Export: do not export tail dependencies if there are not entities --- Services/Export/classes/class.ilExport.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Services/Export/classes/class.ilExport.php b/Services/Export/classes/class.ilExport.php index c165d8cae69f..ce62bd9798e5 100644 --- a/Services/Export/classes/class.ilExport.php +++ b/Services/Export/classes/class.ilExport.php @@ -602,6 +602,10 @@ public function processExporter( $this->log->debug("process tail dependencies of " . $a_entity); $sequence = $exp->getXmlExportTailDependencies($a_entity, $a_target_release, $a_id); foreach ($sequence as $s) { + if (empty((array) $s["ids"])) { + continue; + } + $comp = explode("/", $s["component"]); $exp_class = "il" . $comp[1] . "Exporter"; $s = $this->processExporter( From 30d010a808012f30c6c64072ed5c5b9e18c72896 Mon Sep 17 00:00:00 2001 From: Tim Schmitz Date: Fri, 26 Jul 2024 14:21:25 +0200 Subject: [PATCH 2/3] fix cp notice --- Services/Export/classes/class.ilExport.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Services/Export/classes/class.ilExport.php b/Services/Export/classes/class.ilExport.php index ce62bd9798e5..dc4d01db5081 100644 --- a/Services/Export/classes/class.ilExport.php +++ b/Services/Export/classes/class.ilExport.php @@ -1,7 +1,5 @@ From 4b22ca017bc75461fa13deaffc096af79d3ecc73 Mon Sep 17 00:00:00 2001 From: Tim Schmitz Date: Mon, 5 Aug 2024 16:47:12 +0200 Subject: [PATCH 3/3] Export: more robust array access --- Services/Export/classes/class.ilExport.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Services/Export/classes/class.ilExport.php b/Services/Export/classes/class.ilExport.php index dc4d01db5081..c6e73ef3c067 100644 --- a/Services/Export/classes/class.ilExport.php +++ b/Services/Export/classes/class.ilExport.php @@ -603,7 +603,7 @@ public function processExporter( $this->log->debug("process tail dependencies of " . $a_entity); $sequence = $exp->getXmlExportTailDependencies($a_entity, $a_target_release, $a_id); foreach ($sequence as $s) { - if (empty((array) $s["ids"])) { + if (empty((array) ($s["ids"] ?? []))) { continue; }