Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/06/2023 11:35:55 PM (3 years ago)
Author:
espellcaste
Message:

PHPCS: adding a little bit of space between brackets.

Closes https://github.com/buddypress/buddypress/pull/44
See #7228

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field-type-datebox.php

    r13372 r13392  
    193193        // Check for updated posted values, and errors preventing them from
    194194        // being saved first time.
    195         if ( ! empty( $_POST['field_' . $this->field_obj->id . '_day'] ) ) {
    196             $new_day = (int) $_POST['field_' . $this->field_obj->id . '_day'];
     195        if ( ! empty( $_POST[ 'field_' . $this->field_obj->id . '_day' ] ) ) {
     196            $new_day = (int) $_POST[ 'field_' . $this->field_obj->id . '_day' ];
    197197            $day     = ( $day != $new_day ) ? $new_day : $day;
    198198        }
    199199
    200         if ( ! empty( $_POST['field_' . $this->field_obj->id . '_month'] ) ) {
    201             if ( in_array( $_POST['field_' . $this->field_obj->id . '_month'], $eng_months ) ) {
    202                 $new_month = $_POST['field_' . $this->field_obj->id . '_month'];
     200        if ( ! empty( $_POST[ 'field_' . $this->field_obj->id . '_month' ] ) ) {
     201            if ( in_array( $_POST[ 'field_' . $this->field_obj->id . '_month' ], $eng_months ) ) {
     202                $new_month = $_POST[ 'field_' . $this->field_obj->id . '_month' ];
    203203            } else {
    204204                $new_month = $month;
     
    208208        }
    209209
    210         if ( ! empty( $_POST['field_' . $this->field_obj->id . '_year'] ) ) {
    211             $new_year = (int) $_POST['field_' . $this->field_obj->id . '_year'];
     210        if ( ! empty( $_POST[ 'field_' . $this->field_obj->id . '_year' ] ) ) {
     211            $new_year = (int) $_POST[ 'field_' . $this->field_obj->id . '_year' ];
    212212            $year     = ( $year != $new_year ) ? $new_year : $year;
    213213        }
     
    242242
    243243                for ( $i = 0; $i < 12; ++$i ) {
    244                     $html .= sprintf( '<option value="%1$s" %2$s>%3$s</option>', esc_attr( $eng_months[$i] ), selected( $month, $eng_months[$i], false ), $months[$i] );
     244                    $html .= sprintf( '<option value="%1$s" %2$s>%3$s</option>', esc_attr( $eng_months[ $i ] ), selected( $month, $eng_months[ $i ], false ), $months[ $i ] );
    245245                }
    246246            break;
Note: See TracChangeset for help on using the changeset viewer.