From 52ffa50eaf62584f54d4e9730305f0e4a9cc0b04 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Mon, 25 Nov 2024 08:32:32 +0700 Subject: [PATCH] fix: Check languageName exists before printing in keyboard details --- _includes/includes/ui/keyboard-details.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/_includes/includes/ui/keyboard-details.php b/_includes/includes/ui/keyboard-details.php index 5d0e35b5..3e24060a 100644 --- a/_includes/includes/ui/keyboard-details.php +++ b/_includes/includes/ui/keyboard-details.php @@ -518,11 +518,13 @@ protected static function WriteKeyboardDetails() { echo " Expand $count more >>"; echo "<< Collapse "; } - echo - "" . - (!strcasecmp($bcp47, self::$bcp47) ? "".htmlspecialchars($detail->languageName)."" : htmlspecialchars($detail->languageName)). - " "; + if (array_key_exists('languageName', $detail)) { + echo + "" . + (!strcasecmp($bcp47, self::$bcp47) ? "".htmlspecialchars($detail->languageName)."" : htmlspecialchars($detail->languageName)). + " "; + } $n++; } if($n >= 3) {