Skip to content

Commit

Permalink
Ensure any array elements are non-empty.
Browse files Browse the repository at this point in the history
Fixes potential infinite recursion issue in Mnemo_Api::listBy()
  • Loading branch information
mrubinsk committed Feb 20, 2017
1 parent 87ce441 commit 3fdf043
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mnemo/lib/Mnemo.php
Expand Up @@ -535,6 +535,8 @@ static public function getSyncNotepads($prune = false)
{
$haveRemoved = false;
$cs = unserialize($GLOBALS['prefs']->getValue('sync_notepads'));
// Ensure we have an actual non-empty value for any entry.
$cs = array_filter($cs);
if (!empty($cs)) {
if ($prune) {
$notepads = self::listNotepads(true, Horde_Perms::DELETE);
Expand Down

0 comments on commit 3fdf043

Please sign in to comment.