summaryrefslogtreecommitdiff
path: root/actions/profilesettings.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/profilesettings.php')
-rw-r--r--actions/profilesettings.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/actions/profilesettings.php b/actions/profilesettings.php
index 0474c6937..e5698011a 100644
--- a/actions/profilesettings.php
+++ b/actions/profilesettings.php
@@ -110,6 +110,12 @@ class ProfilesettingsAction extends SettingsAction {
$user = common_current_user();
$profile = $user->getProfile();
+ if (!$profile) {
+ common_log_db_error($user, 'SELECT', __FILE__);
+ $this->server_error(_('User without matching profile'));
+ return;
+ }
+
$original = $profile->getOriginalAvatar();