From d24f9aa8a188d1537cfd908d028ac0cb1546178a Mon Sep 17 00:00:00 2001 From: Beatrycze Volk Date: Thu, 30 May 2024 14:01:44 +0200 Subject: [PATCH] [BUGFIX] Fix warnings for undefined array keys in `Mods` class (#1227) Co-authored-by: Sebastian Meyer --- Classes/Format/Mods.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/Format/Mods.php b/Classes/Format/Mods.php index c62f3605c..3905a4e8e 100644 --- a/Classes/Format/Mods.php +++ b/Classes/Format/Mods.php @@ -273,7 +273,7 @@ private function getHolderFromXml(array $holders, int $i): void * Get holder from XML display form. * * @access private - * + * * @param array $holders * @param int $i * @@ -306,7 +306,7 @@ private function getPlaces(): void if (!empty($places)) { foreach ($places as $place) { $this->metadata['place'][] = (string) $place; - if (!$this->metadata['place_sorting'][0]) { + if (empty($this->metadata['place_sorting'][0])) { $this->metadata['place_sorting'][0] = preg_replace('/[[:punct:]]/', '', (string) $place); } } @@ -339,7 +339,7 @@ private function getYears(): void if (!empty($years)) { foreach ($years as $year) { $this->metadata['year'][] = (string) $year; - if (!$this->metadata['year_sorting'][0]) { + if (empty($this->metadata['year_sorting'][0])) { $yearSorting = str_ireplace('x', '5', preg_replace('/[^\d.x]/i', '', (string) $year)); if ( strpos($yearSorting, '.')