]> git.wh0rd.org Git - tt-rss.git/commitdiff
fix warning in hotkey help dialog when disabled hotkey is processed
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 15 Mar 2013 06:05:48 +0000 (10:05 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 15 Mar 2013 06:05:48 +0000 (10:05 +0400)
classes/backend.php

index d9a7a9fec5b8ff41f3ecec90c07b697db2c42858..5473c5c796aa0a726a84ca072d35582463e9bd46 100644 (file)
@@ -39,18 +39,19 @@ class Backend extends Handler {
 
                        foreach ($hotkeys as $action => $description) {
 
-                               foreach ($omap[$action] as $sequence) {
-                                       if (strpos($sequence, "|") !== FALSE) {
-                                               $sequence = substr($sequence,
-                                                       strpos($sequence, "|")+1,
-                                                       strlen($sequence));
+                               if (is_array($omap[$action])) {
+                                       foreach ($omap[$action] as $sequence) {
+                                               if (strpos($sequence, "|") !== FALSE) {
+                                                       $sequence = substr($sequence,
+                                                               strpos($sequence, "|")+1,
+                                                               strlen($sequence));
+                                               }
+
+                                               print "<li>";
+                                               print "<span class='hksequence'>$sequence</span>";
+                                               print $description;
+                                               print "</li>";
                                        }
-
-                                       print "<li>";
-                                       print "<span class='hksequence'>$sequence</span>";
-                                       print $description;
-                                       print "</li>";
-
                                }
                        }
                }