aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/ucp
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-03-25 17:00:53 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-03-25 17:00:53 +0000
commit1096b13c7e9594b5ef1c610d1d744ae01d8eabfa (patch)
tree4b5185ce4ac829828f2f9ea69fea3d4dd5a76c7b /phpBB/includes/ucp
parentc92e1c12a07a1c0eca024f0c127d875c08901f24 (diff)
downloadforums-1096b13c7e9594b5ef1c610d1d744ae01d8eabfa.tar
forums-1096b13c7e9594b5ef1c610d1d744ae01d8eabfa.tar.gz
forums-1096b13c7e9594b5ef1c610d1d744ae01d8eabfa.tar.bz2
forums-1096b13c7e9594b5ef1c610d1d744ae01d8eabfa.tar.xz
forums-1096b13c7e9594b5ef1c610d1d744ae01d8eabfa.zip
make sure sql ary is filled before executing the query
git-svn-id: file:///svn/phpbb/trunk@5723 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/ucp')
-rw-r--r--phpBB/includes/ucp/ucp_profile.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index 09d4f37d64..a9327bcde0 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -179,10 +179,13 @@ class ucp_profile
);
}
- $sql = 'UPDATE ' . USERS_TABLE . '
- SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
- WHERE user_id = ' . $user->data['user_id'];
- $db->sql_query($sql);
+ if (sizeof($sql_ary))
+ {
+ $sql = 'UPDATE ' . USERS_TABLE . '
+ SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
+ WHERE user_id = ' . $user->data['user_id'];
+ $db->sql_query($sql);
+ }
// Need to update config, forum, topic, posting, messages, etc.
if ($username != $user->data['username'] && $auth->acl_get('u_chgname') && $config['allow_namechange'])