Fix getNonStandardShortcuts (#3924)

#fix https://github.com/FreshRSS/FreshRSS/issues/3922
Quick fix. The `getNonStandardShortcuts()` could probably be re-written.
pull/3933/head
Alexandre Alapetite 3 years ago committed by GitHub
parent f1e4b980fb
commit c5ab4cea4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      lib/lib_rss.php

@ -538,10 +538,8 @@ function getNonStandardShortcuts($shortcuts) {
$standard = strtolower(implode(' ', SHORTCUT_KEYS));
$nonStandard = array_filter($shortcuts, function ($shortcut) use ($standard) {
if (false !== strpos($shortcut, ' ')) {
return true;
}
return !preg_match("/${shortcut}/i", $standard);
$shortcut = trim($shortcut);
return $shortcut !== '' & stripos($standard, $shortcut) === false;
});
return $nonStandard;

Loading…
Cancel
Save