| @@ -42,11 +42,11 @@ | ||
| 42 | 42 | |
| 43 | 43 | $field_array = FrmAppHelper::start_field_array( $field ); |
| 44 | 44 | $field_array['value'] = $new_value; |
| 45 | 45 | $field_array['type'] = apply_filters( 'frm_field_type', $field->type, $field, $new_value ); |
| 46 | - $field_array['parent_form_id'] = $args['parent_form_id'] ?? $field->form_id; | |
| 46 | + $field_array['parent_form_id'] = isset( $args['parent_form_id'] ) ? $args['parent_form_id'] : $field->form_id; | |
| 47 | 47 | $field_array['reset_value'] = $reset; |
| 48 | - $field_array['in_embed_form'] = $args['in_embed_form'] ?? '0'; | |
| 48 | + $field_array['in_embed_form'] = isset( $args['in_embed_form'] ) ? $args['in_embed_form'] : '0'; | |
| 49 | 49 | $field_array['original_default'] = $original_default; |
| 50 | 50 | |
| 51 | 51 | FrmFieldsHelper::prepare_new_front_field( $field_array, $field, $args ); |
| 52 | 52 | |
| @@ -194,9 +194,9 @@ | ||
| 194 | 194 | * @param array $atts |
| 195 | 195 | * @return string |
| 196 | 196 | */ |
| 197 | 197 | public static function prepare_display_value( $entry, $field, $atts ) { |
| 198 | - $field_value = $entry->metas[ $field->id ] ?? false; | |
| 198 | + $field_value = isset( $entry->metas[ $field->id ] ) ? $entry->metas[ $field->id ] : false; | |
| 199 | 199 | |
| 200 | 200 | if ( FrmAppHelper::pro_is_installed() ) { |
| 201 | 201 | $empty = empty( $field_value ); |
| 202 | 202 | FrmProEntriesHelper::get_dynamic_list_values( $field, $entry, $field_value ); |
| @@ -222,9 +222,9 @@ | ||
| 222 | 222 | // This is a repeating section. |
| 223 | 223 | $child_entries = FrmEntry::getAll( array( 'it.parent_item_id' => $entry->id ), '', '', true ); |
| 224 | 224 | } else { |
| 225 | 225 | // Get all values for this field. |
| 226 | - $child_values = $entry->metas[ $atts['embedded_field_id'] ] ?? false; | |
| 226 | + $child_values = isset( $entry->metas[ $atts['embedded_field_id'] ] ) ? $entry->metas[ $atts['embedded_field_id'] ] : false; | |
| 227 | 227 | |
| 228 | 228 | if ( $child_values ) { |
| 229 | 229 | $child_entries = FrmEntry::getAll( array( 'it.id' => (array) $child_values ) ); |
| 230 | 230 | } |
| @@ -307,9 +307,9 @@ | ||
| 307 | 307 | |
| 308 | 308 | if ( FrmAppHelper::pro_is_installed() && $atts['post_id'] && ( $field->field_options['post_field'] || $atts['type'] === 'tag' ) ) { |
| 309 | 309 | $atts['pre_truncate'] = $atts['truncate']; |
| 310 | 310 | $atts['truncate'] = true; |
| 311 | - $atts['exclude_cat'] = $field->field_options['exclude_cat'] ?? 0; | |
| 311 | + $atts['exclude_cat'] = isset( $field->field_options['exclude_cat'] ) ? $field->field_options['exclude_cat'] : 0; | |
| 312 | 312 | |
| 313 | 313 | $value = FrmProEntryMetaHelper::get_post_value( $atts['post_id'], $field->field_options['post_field'], $field->field_options['custom_field'], $atts ); |
| 314 | 314 | $atts['truncate'] = $atts['pre_truncate']; |
| 315 | 315 | } |
| @@ -605,9 +605,9 @@ | ||
| 605 | 605 | } |
| 606 | 606 | |
| 607 | 607 | // finally get the correct version number |
| 608 | 608 | $known = array( 'Version', $ub, 'other' ); |
| 609 | - $pattern = '#(?<browser>' . implode( '|', $known ) . ')[/ ]+(?<version>[0-9.|a-zA-Z.]*)#'; | |
| 609 | + $pattern = '#(?<browser>' . join( '|', $known ) . ')[/ ]+(?<version>[0-9.|a-zA-Z.]*)#'; | |
| 610 | 610 | // Get the matching numbers. |
| 611 | 611 | preg_match_all( $pattern, $u_agent, $matches ); |
| 612 | 612 | |
| 613 | 613 | // see how many we have |
| @@ -638,9 +638,9 @@ | ||
| 638 | 638 | /** |
| 639 | 639 | * @since 3.0 |
| 640 | 640 | */ |
| 641 | 641 | public static function actions_dropdown( $atts ) { |
| 642 | - $id = $atts['id'] ?? FrmAppHelper::get_param( 'id', 0, 'get', 'absint' ); | |
| 642 | + $id = isset( $atts['id'] ) ? $atts['id'] : FrmAppHelper::get_param( 'id', 0, 'get', 'absint' ); | |
| 643 | 643 | $links = self::get_action_links( $id, $atts['entry'] ); |
| 644 | 644 | |
| 645 | 645 | foreach ( $links as $link ) { |
| 646 | 646 | ?> |