From 98a2971c8a1cb625419f3ee2d1a5a514ccfeeb5f Mon Sep 17 00:00:00 2001 From: Tim Schmitz Date: Wed, 16 Aug 2023 11:06:30 +0200 Subject: [PATCH] AdvMD: small array access fixes --- .../AdvancedMetaData/classes/class.ilAdvancedMDParser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Services/AdvancedMetaData/classes/class.ilAdvancedMDParser.php b/Services/AdvancedMetaData/classes/class.ilAdvancedMDParser.php index b005cd2dae32..426f5980ffc0 100644 --- a/Services/AdvancedMetaData/classes/class.ilAdvancedMDParser.php +++ b/Services/AdvancedMetaData/classes/class.ilAdvancedMDParser.php @@ -36,7 +36,7 @@ class ilAdvancedMDParser extends ilSaxParser implements ilSaxSubsetParser protected array $record_ids = []; // local adv md record support - protected ?array $local_record = []; + protected ?array $local_record = null; protected array $local_rec_map = []; protected array $local_rec_fields_map = []; @@ -115,7 +115,7 @@ public function handlerBeginTag($a_xml_parser, string $a_name, array $a_attribs) (string) $a_attribs['id'], (string) $a_attribs['sub_type'], (int) $a_attribs['sub_id'], - (int) $a_attribs['local_rec_id'] + isset($a_attribs['local_rec_id']) ? (int) $a_attribs['local_rec_id'] : null ); break; }