Index: apachesolr/apachesolr.index.inc
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- apachesolr/apachesolr.index.inc
+++ apachesolr/apachesolr.index.inc
@@ -61,7 +61,7 @@
     foreach ($rows as $row) {
       $row_documents = apachesolr_index_entities_document($row, $entity_type, $env_id);
       // TODO argument #1 is not an array
-      $documents = array_merge($documents, $row_documents);
+      $documents = array_merge((array)$documents, (array)$row_documents);
     }

     $indexed = apachesolr_index_send_to_solr($env_id, $documents);
@@ -124,7 +124,7 @@
     }
     if ($build_document) {
       // TODO argument #2 is not an array
-      $documents = array_merge($documents, apachesolr_index_entity_to_documents($row, $env_id));
+      $documents = array_merge((array)$documents, (array)apachesolr_index_entity_to_documents($row, $env_id));
     }
   }
   else {
@@ -286,7 +286,7 @@
   $documents = array();
   foreach ($document_callbacks as $document_callback) {
     // Call a type-specific callback to add stuff to the document.
-    $documents = array_merge($documents, $document_callback($document, $entity, $entity_type, $env_id));
+    $documents = array_merge((array)$documents, (array)$document_callback($document, $entity, $entity_type, $env_id));
   }

   //do this for all possible documents that were returned by the callbacks
