From 907ca55c5178b2bc866b1c106ed82a99abb4a8a2 Mon Sep 17 00:00:00 2001 From: stonebuzz Date: Tue, 25 Oct 2022 15:44:17 +0200 Subject: [PATCH 1/2] fix(massiveaction): prevent php warning about undefined array key --- inc/labeltranslation.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/labeltranslation.class.php b/inc/labeltranslation.class.php index 2ba87e51..affb6f51 100644 --- a/inc/labeltranslation.class.php +++ b/inc/labeltranslation.class.php @@ -333,6 +333,6 @@ public static function getLabelFor(array $item) return array_values($found)[0]['label']; } - return $item['label']; + return isset($item['label']) ? $item['label'] : ''; } } From c0869631e11dc50be8d2db85574bf2590f5fb33e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Thu, 27 Oct 2022 09:39:33 +0200 Subject: [PATCH 2/2] Update inc/labeltranslation.class.php --- inc/labeltranslation.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/labeltranslation.class.php b/inc/labeltranslation.class.php index affb6f51..abd201b2 100644 --- a/inc/labeltranslation.class.php +++ b/inc/labeltranslation.class.php @@ -333,6 +333,6 @@ public static function getLabelFor(array $item) return array_values($found)[0]['label']; } - return isset($item['label']) ? $item['label'] : ''; + return $item['label'] ?? ''; } }