View difference between Paste ID: 2NyUzEF1 and FCcHK3K2
SHOW: | | - or go back to the newest paste.
1
Index: sf_queue_processor.module
2
===================================================================
3
--- sf_queue_processor.module	(revision 2828)
4
+++ sf_queue_processor.module	(working copy)
5
@@ -294,8 +294,8 @@
6
 		$objects = array();
7
 
8
 		// get all the objects out of the batch
9
-
10
-		foreach($batch['records'] as $item) {
11
+    $records = array();
12
+		foreach($batch['records'] as $i => $item) {
13
 		  // Skip if no object is present. This prevents errors when Sync is run
14
 		  // with nothing pending in the queue.
15
 		  if (!isset($item->object)) {
16
@@ -313,8 +313,9 @@
17
         continue;
18
       }
19
       array_push($objects, (object)$object);
20-
+      $records[$i] = $item;
20+
+      $records[] = $item;
21
 		}
22
-
23
+    $batch['records'] = $records;
24
 		// apply validation for create/upsert/update actions
25
 		if ($batch['action'] != 'delete') {
26
 			queue_validate_batch($objects, $batch['salesforce_type']);