diff --git a/webform_entity.module b/webform_entity.module index f377b2b53a9f05d78e48f3f182a774bd4f2fdacf..62bc8b097a799f03258404a51fc69df688d3395b 100644 --- a/webform_entity.module +++ b/webform_entity.module @@ -533,7 +533,12 @@ class WebformSubmissionsController extends DrupalDefaultEntityController { } // TODO: Maybe figure out a way to prevent what is essentially a double load. // We hook into the webform load op - $submissions = webform_get_submissions($sids); + $fetched = webform_get_submissions($sids); + // Re-key the submissions so they're in the order requested. + $submissions = array(); + foreach ($ids as $id) { + $submissions[$id] = isset($fetched[$id]) ? $fetched[$id] : NULL; + } } else { $submissions = array();