To be exact:
warning: array_keys() expects parameter 1 to be array, null given in /var/vhosts/vsu/sites/all/modules/webform/includes/webform.submissions.inc on line 270.

This happens due lack of validation session variable before using it. Here is simple patch to fix this:

--- webform.submissions.inc.old2	2010-05-25 13:52:31.000000000 -0500
+++ webform.submissions.inc	2010-06-03 13:23:27.000000000 -0500
@@ -266,7 +266,7 @@
       $where[] = $column . ' = ' . (is_numeric($value) ? '%d' : "'%s'");
     }
 
-    if (isset($filters['uid']) && $filters['uid'] === 0) {
+    if (isset($filters['uid']) && $filters['uid'] === 0 && is_array($_SESSION['webform_submission'])) {
       $anonymous_sids = array_keys($_SESSION['webform_submission']);
       if (count($anonymous_sids)) {
         $placeholders = array_fill(0, count($anonymous_sids), "%d");
CommentFileSizeAuthor
webform.submissions.inc_.2.patch586 bytespavel.karoukin

Comments

quicksketch’s picture

Status: Needs review » Fixed

Thanks, I used isset() instead of is_array() but the end effect should be the same. Committed to both 3.x branches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

alltooeasy’s picture

I am encoutering a very similar issue in Drupal 7. Can anyone suggest a fix?