diff options
Diffstat (limited to 'lib/preferences.php')
-rw-r--r-- | lib/preferences.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/preferences.php b/lib/preferences.php index d53cdd538e0..5af007f0223 100644 --- a/lib/preferences.php +++ b/lib/preferences.php @@ -116,14 +116,13 @@ class OC_Preferences{ // Try to fetch the value, return default if not exists. $query = OC_DB::prepare( 'SELECT configvalue FROM *PREFIX*preferences WHERE userid = ? AND appid = ? AND configkey = ?' ); $result = $query->execute( array( $user, $app, $key )); - - if( !$result->numRows()){ + + $row = $result->fetchRow(); + if($row){ + return $row["configvalue"]; + }else{ return $default; } - - $row = $result->fetchRow(); - - return $row["configvalue"]; } /** |