rabin 3 years ago
parent
commit
fb40c88fc7
1 changed files with 5 additions and 2 deletions
  1. 5 2
      main/src/Content.php

+ 5 - 2
main/src/Content.php

@@ -96,8 +96,11 @@ class Content extends Core
     public function getMenuName($key)
     {
         $menu = $this->menu();
-
-        return $menu[$key]['name'];
+        if (isset($menu[$key])) {
+            return $menu[$key]['name'];
+        } else {
+            return false;
+        }
     }
 
     # 焦点图