diff --git a/apachesolr.index.inc b/apachesolr.index.inc
index 6be0112..862589c 100644
--- a/apachesolr.index.inc
+++ b/apachesolr.index.inc
@@ -187,7 +187,7 @@ function apachesolr_index_entity_to_documents($item, $env_id) {
   }
 
   // Now allow modules to alter each other's additions for maximum flexibility.
-  drupal_alter('apachesolr_index_documents', $documents, $entity, $entity_type, $env_id);
+  drupal_alter('apachesolr_index_documents', $documents, array('entity' => $entity, 'entity_type' => $entity_type, 'env_id' => $env_id));
 
   // Restore the user.
   $user = $saved_user;
