Skip to content

Commit

Permalink
Bug/typo fix that caused a PHP warning
Browse files Browse the repository at this point in the history
Fix for:
count(): Parameter must be an array or an object that implements Countable
  • Loading branch information
Every0ne authored Jan 16, 2020
1 parent 39669fc commit b99b17b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_menu/php/data.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ static protected function strtoslug($string) {
// transliteration
static protected function transliterate($string) {
global $i18n;
if (isset($i18n['TRANSLITERATION']) && is_array($translit = $i18n['TRANSLITERATION']) && count($translit > 0)) {
if (isset($i18n['TRANSLITERATION']) && is_array($translit = $i18n['TRANSLITERATION']) && count($translit) > 0) {
$string = str_replace(array_keys($translit), array_values($translit), $string);
}
return $string;
Expand Down Expand Up @@ -190,4 +190,4 @@ static public function menuExists($slug) {
static public function getMenuFilename($slug) {
return GSDATAOTHERPATH . CustomMenu::FILE . '/' . $slug . self::EXT;
}
}
}

0 comments on commit b99b17b

Please sign in to comment.