From ac9cf8976ec6353b335d76d50422f36ddff1fe1e Mon Sep 17 00:00:00 2001
From: Koala Yeung <koalay@gmail.com>
Date: Mon, 15 Mar 2021 17:32:46 +0800
Subject: [PATCH 2/2] Simplified code

---
 webform.module | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/webform.module b/webform.module
index 80a290b41..cffd19b01 100644
--- a/webform.module
+++ b/webform.module
@@ -2076,8 +2076,7 @@ function webform_client_form_includes($form, $form_state) {
 function _webform_client_form_rule_check($node, $component, $page_num, $form_state = NULL, $submission = NULL) {
   $conditional_values = isset($component['extra']['conditional_values']) ? $component['extra']['conditional_values'] : NULL;
   $conditional_component = isset($component['extra']['conditional_component']) && isset($node->webform['components'][$component['extra']['conditional_component']]) ? $node->webform['components'][$component['extra']['conditional_component']] : NULL;
-  $conditional_cid = is_array($conditional_component) && isset($conditional_component['cid']) ?
-    $conditional_component['cid'] : NULL;
+  $conditional_cid = isset($conditional_component['cid']) ? $conditional_component['cid'] : NULL;
 
   // Check the rules for this entire page. Note individual page breaks are
   // checked down below in the individual component rule checks.
-- 
2.29.2

