Hello Folks,
What means the next line?
[11-Dec-2012 16:10:08] PHP Warning: strtolower() expects parameter 1 to be string, array given in ../roundcubemail-0.8.4/program/include/rcmail.php on line 423
public function get_address_book($id, $writeable = false) { $contacts = null; $ldap_config = (array)$this->config->get('ldap_public'); // The next line is the numer 423 $abook_type = strtolower($this->config->get('address_book_type'));
// 'sql' is the alias for '0' used by autocomplete
if ($id == 'sql')
$id = '0';
// use existing instance
if (isset($this->address_books[$id]) &&
is_object($this->address_books[$id]) && is_a($this->address_books[$id], 'rcube_addressbook') && (!$writeable || !$this->address_books[$id]->readonly) ) { $contacts = $this->address_books[$id]; } else if ($id && $ldap_config[$id]) { $contacts = new rcube_ldap($ldap_config[$id], $this->config->get('ldap_debug'), $this->config->mail_domain($_SESSION['storage_host'])); } else if ($id === '0') { $contacts = new rcube_contacts($this->db, $this->user->ID); } else { $plugin = $this->plugins->exec_hook('addressbook_get', array('id' => $id, 'writeable' => $writeable));
// plugin returned instance of a rcube_addressbook
if ($plugin['instance'] instanceof rcube_addressbook) {
$contacts = $plugin['instance'];
}
// get first source from the list
else if (!$id) {
$source = reset($this->get_address_sources($writeable));
if (!empty($source)) {
$contacts = $this->get_address_book($source['id']);
if ($contacts)
$id = $source['id'];
}
}
}
if (!$contacts) {
raise_error(array(
'code' => 700, 'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Addressbook source ($id) not found!"),
true, true);
}
// set configured sort order
if ($sort_col = $this->config->get('addressbook_sort_col'))
$contacts->set_sort_order($sort_col);
// add to the 'books' array for shutdown function
$this->address_books[$id] = $contacts;
return $contacts;
}
Regards,
Reymer Vargas