diff --git includes/bootstrap.inc includes/bootstrap.inc
index bea0077..66f4886 100644
--- includes/bootstrap.inc
+++ includes/bootstrap.inc
@@ -1176,7 +1176,7 @@ function bootstrap_hooks() {
 function drupal_unpack($obj, $field = 'data') {
   if ($obj->$field && $data = unserialize($obj->$field)) {
     foreach ($data as $key => $value) {
-      if (!isset($obj->$key)) {
+      if (!empty($key) && !isset($obj->$key)) {
         $obj->$key = $value;
       }
     }
diff --git modules/user/user.module modules/user/user.module
index caacbf5..359d880 100644
--- modules/user/user.module
+++ modules/user/user.module
@@ -393,7 +393,7 @@ function user_save($account, $edit = array(), $category = 'account') {
           if ($value === NULL) {
             unset($data[$key]);
           }
-          else {
+          elseif (!empty($key)) {
             $data[$key] = $value;
           }
         }
diff --git modules/user/user.test modules/user/user.test
index 0c184b8..46c6623 100644
--- modules/user/user.test
+++ modules/user/user.test
@@ -1315,6 +1315,10 @@ class UserSaveTestCase extends DrupalWebTestCase {
 
     $user_by_name = user_load_by_name($test_name);
     $this->assertTrue($user_by_name, t('Loading user by name.'));
+
+    // Mimic a broken module calling user_save with an empty key.
+    user_save($user_by_name, array('' => $this->randomName()));
+    $this->drupalGet('user/' . $user_by_name->uid);
   }
 }
 
