| @@ -709,9 +709,9 @@ | ||
| 709 | 709 | } |
| 710 | 710 | |
| 711 | 711 | foreach ( $options as $opt_key => $opt ) { |
| 712 | 712 | if ( is_array( $opt ) ) { |
| 713 | - $opt = $opt['value'] ?? $opt['label'] ?? reset( $opt ); | |
| 713 | + $opt = isset( $opt['value'] ) ? $opt['value'] : ( isset( $opt['label'] ) ? $opt['label'] : reset( $opt ) ); | |
| 714 | 714 | } |
| 715 | 715 | |
| 716 | 716 | if ( $opt == $default_value ) { |
| 717 | 717 | unset( $options[ $opt_key ] ); |
| @@ -2103,9 +2103,9 @@ | ||
| 2103 | 2103 | private static function migrate_autoresponder_to_action( $form_options, $form_id, &$notifications ) { |
| 2104 | 2104 | if ( isset( $form_options['auto_responder'] ) && $form_options['auto_responder'] && isset( $form_options['ar_email_message'] ) && $form_options['ar_email_message'] ) { |
| 2105 | 2105 | // migrate autoresponder |
| 2106 | 2106 | |
| 2107 | - $email_field = $form_options['ar_email_to'] ?? 0; | |
| 2107 | + $email_field = isset( $form_options['ar_email_to'] ) ? $form_options['ar_email_to'] : 0; | |
| 2108 | 2108 | if ( strpos( $email_field, '|' ) ) { |
| 2109 | 2109 | // data from entries field |
| 2110 | 2110 | $email_field = explode( '|', $email_field ); |
| 2111 | 2111 | if ( isset( $email_field[1] ) ) { |
| @@ -2119,18 +2119,18 @@ | ||
| 2119 | 2119 | $notification = $form_options; |
| 2120 | 2120 | $new_notification2 = array( |
| 2121 | 2121 | 'post_content' => array( |
| 2122 | 2122 | 'email_message' => $notification['ar_email_message'], |
| 2123 | - 'email_subject' => $notification['ar_email_subject'] ?? '', | |
| 2123 | + 'email_subject' => isset( $notification['ar_email_subject'] ) ? $notification['ar_email_subject'] : '', | |
| 2124 | 2124 | 'email_to' => $email_field, |
| 2125 | - 'plain_text' => $notification['ar_plain_text'] ?? 0, | |
| 2125 | + 'plain_text' => isset( $notification['ar_plain_text'] ) ? $notification['ar_plain_text'] : 0, | |
| 2126 | 2126 | 'inc_user_info' => 0, |
| 2127 | 2127 | ), |
| 2128 | 2128 | 'post_name' => $form_id . '_email_' . count( $notifications ), |
| 2129 | 2129 | ); |
| 2130 | 2130 | |
| 2131 | - $reply_to = $notification['ar_reply_to'] ?? ''; | |
| 2132 | - $reply_to_name = $notification['ar_reply_to_name'] ?? ''; | |
| 2131 | + $reply_to = isset( $notification['ar_reply_to'] ) ? $notification['ar_reply_to'] : ''; | |
| 2132 | + $reply_to_name = isset( $notification['ar_reply_to_name'] ) ? $notification['ar_reply_to_name'] : ''; | |
| 2133 | 2133 | |
| 2134 | 2134 | if ( ! empty( $reply_to ) ) { |
| 2135 | 2135 | $new_notification2['post_content']['reply_to'] = $reply_to; |
| 2136 | 2136 | } |