diff --git a/_includes/includes/ui/keyboard-details.php b/_includes/includes/ui/keyboard-details.php index 98d4d88..43ce298 100644 --- a/_includes/includes/ui/keyboard-details.php +++ b/_includes/includes/ui/keyboard-details.php @@ -94,7 +94,7 @@ public static function get_tier_from_request($tier = 'stable') { protected static function map_license($s) { $license_map = ['mit' => 'MIT']; - return array_key_exists($s, $license_map) ? $license_map[$s] : $s; + return property_exists($license_map, $s) ? $license_map[$s] : $s; } protected static function download_box($platform) { @@ -205,7 +205,7 @@ protected static function LoadData() { self::$keyboardPlatforms = ""; $vars = get_object_vars(self::$keyboard->platformSupport); foreach ($vars as $var => $value) { - if ($value != 'none' && array_key_exists($var, $platformTitles)) { + if ($value != 'none' && property_exists($platformTitles, $var)) { self::$keyboardPlatforms .= "{$platformTitles[$var]}"; } } diff --git a/_includes/includes/ui/legacy-keyboard-details.php b/_includes/includes/ui/legacy-keyboard-details.php index b79d553..60e95a0 100644 --- a/_includes/includes/ui/legacy-keyboard-details.php +++ b/_includes/includes/ui/legacy-keyboard-details.php @@ -74,7 +74,7 @@ public static function get_tier_from_request($tier = 'stable') { protected static function map_license($s) { $license_map = ['mit' => 'MIT']; - return array_key_exists($s, $license_map) ? $license_map[$s] : $s; + return property_exists($license_map, $s) ? $license_map[$s] : $s; } protected static function download_box($url, $title, $description, $class, $linktitle, $platform, $mode='standalone') { @@ -323,7 +323,7 @@ protected static function LoadData() { self::$keyboardPlatforms = ''; $vars = get_object_vars(self::$keyboard->platformSupport); foreach ($vars as $var => $value) { - if ($value != 'none' && array_key_exists($var, $platformTitles)) { + if ($value != 'none' && property_exists($platformTitles, $var)) { self::$keyboardPlatforms .= (self::$keyboardPlatforms == '' ? '' : ', ') . $platformTitles[$var]; } } @@ -441,7 +441,7 @@ protected static function WriteDownloadBoxes() { "Android" => "self::WriteAndroidBoxes" ); - $text = (isset($pageDevice) && array_key_exists($pageDevice, $deviceboxfuncs)) ? $deviceboxfuncs[$pageDevice] : ''; + $text = (isset($pageDevice) && property_exists($deviceboxfuncs, $pageDevice)) ? $deviceboxfuncs[$pageDevice] : ''; $webtext = self::WriteWebBoxes(); if ($text) {