Skip to content

Commit

Permalink
[mjr] Avoid PHP warnings due to corrupt preference values (Bug #14585).
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Feb 24, 2017
1 parent 0ef893b commit 1dde87a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions nag/docs/CHANGES
Expand Up @@ -2,6 +2,7 @@
v4.2.14-git
-----------

[mjr] Avoid PHP warnings due to corrupt preference values (Bug #14585).


-------
Expand Down
4 changes: 4 additions & 0 deletions nag/lib/Nag.php
Expand Up @@ -1703,6 +1703,10 @@ static protected function _getOwner($task)
static public function getSyncLists()
{
$cs = unserialize($GLOBALS['prefs']->getValue('sync_lists'));

// Bug #14585 Filter out erroneous null values.
$cs = array_filter($cs);

if (!empty($cs)) {
// Have a pref, make sure it's still available
$lists = self::listTasklists(false, Horde_Perms::DELETE);
Expand Down
4 changes: 2 additions & 2 deletions nag/package.xml
Expand Up @@ -33,7 +33,7 @@
</stability>
<license uri="http://www.horde.org/licenses/gpl">GPL-2.0</license>
<notes>
*
* [mjr] Avoid PHP warnings due to corrupt preference values (Bug #14585).
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -1779,7 +1779,7 @@
<date>2016-11-09</date>
<license uri="http://www.horde.org/licenses/gpl">GPL-2.0</license>
<notes>
*
* [mjr] Avoid PHP warnings due to corrupt preference values (Bug #14585).
</notes>
</release>
</changelog>
Expand Down

0 comments on commit 1dde87a

Please sign in to comment.