Skip to content

Commit

Permalink
This requires the contacts API to be present as well.
Browse files Browse the repository at this point in the history
Fixes edge case where a fatal error is thrown when IMP is
installed, but Turba isn't.
  • Loading branch information
mrubinsk committed Feb 17, 2016
1 parent 77ed680 commit 8d03365
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion framework/Core/lib/Horde/Core/ActiveSync/Connector.php
Expand Up @@ -358,7 +358,8 @@ public function contacts_getActionTimestamp($uid, $action, $addressbook = null)
*/
public function getRecipientCache($max = 100)
{
if (!$this->_registry->hasInterface('mail')) {
if (!$this->_registry->hasInterface('mail') ||
!$this->_registry->hasInterface('contacts')) {
return array();
}
$cache = $GLOBALS['injector']->getInstance('Horde_Cache');
Expand Down
3 changes: 2 additions & 1 deletion framework/Core/lib/Horde/Core/ActiveSync/Driver.php
Expand Up @@ -477,7 +477,8 @@ public function getFolders()
}
}
}
if ($this->_version > Horde_ActiveSync::VERSION_TWELVEONE) {
if ($this->_version > Horde_ActiveSync::VERSION_TWELVEONE &&
$GLOBALS['registry']->hasInterface('contacts')) {
$folders[] = $this->_getFolder('RI', array('class' => 'RI'));
}

Expand Down

0 comments on commit 8d03365

Please sign in to comment.