Index: view_unpublished.module
===================================================================
--- view_unpublished.module	(revision 10437)
+++ view_unpublished.module	(working copy)
@@ -127,22 +127,24 @@
     if ($perms['any']) {
       $conditions =& $query->conditions();
       foreach ($conditions as $key => $condition) {
-        // For some queries $condition['field'] is not a string so we need a
-        // check for that.
-        if (isset($condition['field']) && $condition['field'] === 'n.status') {
-            // This condition is (probably) coming from
-            // modules/node/node.admin.inc,
-            // function node_admin_nodes(): $query->condition('n.status', 1);
-            // We don't want it.
-            unset($conditions[$key]);
+        if (isset($condition['field'])) {
+          // For some queries $condition['field'] is not a string so we need a
+          // check for that.
+          if ($condition['field'] === 'n.status') {
+              // This condition is (probably) coming from
+              // modules/node/node.admin.inc,
+              // function node_admin_nodes(): $query->condition('n.status', 1);
+              // We don't want it.
+              unset($conditions[$key]);
+          }
+          elseif (is_object($condition['field'])){
+            $subconditions = $conditions[$key]["field"]->conditions();
+            $new_conditions = db_or();
+            $new_conditions->condition('n.status', 1, '=');
+            $new_conditions->condition('n.status', 0, '=');
+            $conditions[$key]["field"] = $new_conditions;
+          }
         }
-        elseif (is_object($condition['field'])){
-          $subconditions = $conditions[$key]["field"]->conditions();
-          $new_conditions = db_or();
-          $new_conditions->condition('n.status', 1, '=');
-          $new_conditions->condition('n.status', 0, '=');
-          $conditions[$key]["field"] = $new_conditions;
-        }
       }
       // If "view any unpublished content" (aka $perms['full']) is set, then
       // leave the rest of the query as-is and return all unpublished content.
