Loading captcha.inc +1 −1 Original line number Diff line number Diff line Loading @@ -258,7 +258,7 @@ function _captcha_get_captcha_placement($form_id, $form) { } // Query the placement map. if (array_key_exists($form_id, $placement_map)) { if (array_key_exists($form_id, $placement_map) && $placement_map[$form_id] !== NULL) { $placement = $placement_map[$form_id]; } // If no placement info is available in placement map: Loading src/Service/CaptchaService.php +2 −2 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ class CaptchaService { * * @param array $form * the form to add the CAPTCHA element to. * @param array $placement * @param null|array $placement * information where the CAPTCHA element should be inserted. * $placement should be an associative array with fields: * - 'path': path (array of path items) of the container in Loading @@ -95,7 +95,7 @@ class CaptchaService { * @param array $captcha_element * the CAPTCHA element to insert. */ public function insertCaptchaElement(array &$form, array $placement, array $captcha_element) { public function insertCaptchaElement(array &$form, null|array $placement, array $captcha_element) { // Get path, target and target weight or use defaults if not available. $target_key = $placement['key'] ?? NULL; $target_weight = $placement['weight'] ?? NULL; Loading Loading
captcha.inc +1 −1 Original line number Diff line number Diff line Loading @@ -258,7 +258,7 @@ function _captcha_get_captcha_placement($form_id, $form) { } // Query the placement map. if (array_key_exists($form_id, $placement_map)) { if (array_key_exists($form_id, $placement_map) && $placement_map[$form_id] !== NULL) { $placement = $placement_map[$form_id]; } // If no placement info is available in placement map: Loading
src/Service/CaptchaService.php +2 −2 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ class CaptchaService { * * @param array $form * the form to add the CAPTCHA element to. * @param array $placement * @param null|array $placement * information where the CAPTCHA element should be inserted. * $placement should be an associative array with fields: * - 'path': path (array of path items) of the container in Loading @@ -95,7 +95,7 @@ class CaptchaService { * @param array $captcha_element * the CAPTCHA element to insert. */ public function insertCaptchaElement(array &$form, array $placement, array $captcha_element) { public function insertCaptchaElement(array &$form, null|array $placement, array $captcha_element) { // Get path, target and target weight or use defaults if not available. $target_key = $placement['key'] ?? NULL; $target_weight = $placement['weight'] ?? NULL; Loading