From: Andrew Dolgov Date: Fri, 15 Mar 2013 06:05:48 +0000 (+0400) Subject: fix warning in hotkey help dialog when disabled hotkey is processed X-Git-Tag: 1.7.3~4 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=7d272e5c04141529309fe2924d0aac93f17b56ea;p=tt-rss.git fix warning in hotkey help dialog when disabled hotkey is processed --- diff --git a/classes/backend.php b/classes/backend.php index d9a7a9fe..5473c5c7 100644 --- a/classes/backend.php +++ b/classes/backend.php @@ -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 "
  • "; + print "$sequence"; + print $description; + print "
  • "; } - - print "
  • "; - print "$sequence"; - print $description; - print "
  • "; - } } }