Index: modules/system/system.api.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.api.php,v
retrieving revision 1.211
diff -u -p -r1.211 system.api.php
--- modules/system/system.api.php	28 Oct 2010 02:27:09 -0000	1.211
+++ modules/system/system.api.php	12 Nov 2010 19:47:57 -0000
@@ -286,7 +286,7 @@ function hook_entity_load($entities, $ty
 function hook_entity_insert($entity, $type) {
   // Insert the new entity into a fictional table of all entities.
   $info = entity_get_info($type);
-  $id = reset(entity_extract_ids($type, $entity));
+  list($id) = entity_extract_ids($type, $entity);
   db_insert('example_entity')
     ->fields(array(
       'type' => $type,
@@ -308,7 +308,7 @@ function hook_entity_insert($entity, $ty
 function hook_entity_update($entity, $type) {
   // Update the entity's entry in a fictional table of all entities.
   $info = entity_get_info($type);
-  $id = reset(entity_extract_ids($type, $entity));
+  list($id) = entity_extract_ids($type, $entity);
   db_update('example_entity')
     ->fields(array(
       'updated' => REQUEST_TIME,
@@ -329,7 +329,7 @@ function hook_entity_update($entity, $ty
 function hook_entity_delete($entity, $type) {
   // Delete the entity's entry from a fictional table of all entities.
   $info = entity_get_info($type);
-  $id = reset(entity_extract_ids($type, $entity));
+  list($id) = entity_extract_ids($type, $entity);
   db_delete('example_entity')
     ->condition('type', $type)
     ->condition('id', $id)
