| @@ -26,10 +26,16 @@ | ||
| 26 | 26 | if (!Helper::isAutoloadCaptchaEnabled()) { |
| 27 | 27 | return false; |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - $statusOption = ArrayHelper::get(static::statusOptionMap(), static::selectedType()); | |
| 30 | + $type = static::selectedType(); | |
| 31 | 31 | |
| 32 | + if (!$type) { | |
| 33 | + return true; | |
| 34 | + } | |
| 35 | + | |
| 36 | + $statusOption = ArrayHelper::get(static::statusOptionMap(), $type); | |
| 37 | + | |
| 32 | 38 | return !$statusOption || !get_option($statusOption, false); |
| 33 | 39 | } |
| 34 | 40 | |
| 35 | 41 | public static function show() |
| @@ -40,9 +46,10 @@ | ||
| 40 | 46 | } |
| 41 | 47 | |
| 42 | 48 | protected static function selectedType() |
| 43 | 49 | { |
| 44 | - return ArrayHelper::get(get_option('_fluentform_global_form_settings'), 'misc.captcha_type'); | |
| 50 | + $type = ArrayHelper::get(get_option('_fluentform_global_form_settings'), 'misc.captcha_type'); | |
| 51 | + return is_string($type) ? $type : ''; | |
| 45 | 52 | } |
| 46 | 53 | |
| 47 | 54 | protected static function statusOptionMap() |
| 48 | 55 | { |