Skip to content

Commit

Permalink
A change might not have any categories.
Browse files Browse the repository at this point in the history
It's possible that a client changed categories, thus adding
the entry to the map table, but then also performed  a separate
change to that same message before the next sync request, which
would not contain a categories entry.
  • Loading branch information
mrubinsk committed Feb 21, 2018
1 parent 62a86fd commit 056419b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Horde/ActiveSync/State/Sql.php
Expand Up @@ -1357,7 +1357,7 @@ protected function _getMailMapChanges(array $changes)
$results[$row['message_uid']][$change['type']] =
(!is_null($row['sync_read']) && $row['sync_read'] == $change['flags']['read']) ||
(!is_null($row['sync_flagged']) && $row['sync_flagged'] == $change['flags']['flagged']) ||
(!is_null($row['sync_category']) && $row['sync_category'] == md5(implode('', $change['categories'])));
(!is_null($row['sync_category']) && !empty($change['categories']) && $row['sync_category'] == md5(implode('', $change['categories'])));
continue 3;
case Horde_ActiveSync::CHANGE_TYPE_DELETE:
$results[$row['message_uid']][$change['type']] =
Expand Down

0 comments on commit 056419b

Please sign in to comment.