| @@ -462,9 +462,9 @@ | ||
| 462 | 462 | $privkey = $recaptcha_opt['privkey'] ?? $privkey; |
| 463 | 463 | $re_lang = $recaptcha_opt['re_lang'] ?? $re_lang; |
| 464 | 464 | } |
| 465 | 465 | |
| 466 | - if ( empty( $this->re_msg ) ) { | |
| 466 | + if ( ! $this->re_msg ) { | |
| 467 | 467 | $this->re_msg = __( 'The CAPTCHA was not entered correctly', 'formidable' ); |
| 468 | 468 | } |
| 469 | 469 | |
| 470 | 470 | if ( ! isset( $this->privkey ) ) { |
| @@ -509,15 +509,17 @@ | ||
| 509 | 509 | * |
| 510 | 510 | * @return void |
| 511 | 511 | */ |
| 512 | 512 | public function maybe_filter_for_form( $args ) { |
| 513 | - if ( isset( $args['current_form'] ) && is_numeric( $args['current_form'] ) ) { | |
| 514 | - $this->current_form = $args['current_form']; | |
| 513 | + if ( ! isset( $args['current_form'] ) || ! is_numeric( $args['current_form'] ) ) { | |
| 514 | + return; | |
| 515 | + } | |
| 515 | 516 | |
| 516 | - foreach ( $this->translatable_strings() as $string ) { | |
| 517 | - $this->{$string} = apply_filters( 'frm_global_setting', $this->{$string}, $string, $this ); | |
| 518 | - $this->{$string} = apply_filters( 'frm_global_' . $string, $this->{$string}, $this ); | |
| 519 | - } | |
| 517 | + $this->current_form = $args['current_form']; | |
| 518 | + | |
| 519 | + foreach ( $this->translatable_strings() as $string ) { | |
| 520 | + $this->{$string} = apply_filters( 'frm_global_setting', $this->{$string}, $string, $this ); | |
| 521 | + $this->{$string} = apply_filters( 'frm_global_' . $string, $this->{$string}, $this ); | |
| 520 | 522 | } |
| 521 | 523 | } |
| 522 | 524 | |
| 523 | 525 | /** |