summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2014-01-07 09:48:55 +0100
committerThomas Bruederli <thomas@roundcube.net>2014-01-07 09:48:55 +0100
commite59471fcb9f4e5e11a6d054e930a21b469f76f97 (patch)
treed82dd423b8c37a4e022df4609633b1ddfeaf4861
parent090d3ed38c62fc71d3a7efb60e62c24103c6b1fe (diff)
Make sure prefs always is a valid array (otherwise causes fatal errors if language if not set)
-rw-r--r--program/lib/Roundcube/rcube_user.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/program/lib/Roundcube/rcube_user.php b/program/lib/Roundcube/rcube_user.php
index 1d5a90577..e232736c9 100644
--- a/program/lib/Roundcube/rcube_user.php
+++ b/program/lib/Roundcube/rcube_user.php
@@ -125,8 +125,10 @@ class rcube_user
*/
function get_prefs()
{
+ $prefs = array();
+
if (!empty($this->language))
- $prefs = array('language' => $this->language);
+ $prefs['language'] = $this->language;
if ($this->ID) {
// Preferences from session (write-master is unavailable)