Skip to content

Commit

Permalink
Catch non-existant address books here too.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Apr 13, 2016
1 parent 983fac5 commit 59b502b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions turba/lib/Factory/Driver.php
Expand Up @@ -63,6 +63,9 @@ public function create($name, $name2 = '')
}

if (!isset($this->_instances[$key])) {
if (!isset($srcConfig['type'])) {
throw new Turba_Exception(sprintf(_("The address book \"%s\" does not exist."), $srcName));
}
$class = 'Turba_Driver_' . ucfirst(basename($srcConfig['type']));
if (!class_exists($class)) {
throw new Turba_Exception(sprintf(_("Unable to load the definition of %s."), $class));
Expand Down

0 comments on commit 59b502b

Please sign in to comment.