| @@ -473,13 +473,14 @@ | ||
| 473 | 473 | * wpbc_clean_digit_or_csd( '10a' ) => '10 |
| 474 | 474 | * or |
| 475 | 475 | * wpbc_clean_digit_or_csd( array( '12,a,45,9', '10a' ) ) => array ( '12,0,45,9', '10' ) |
| 476 | 476 | */ |
| 477 | -function wpbc_clean_digit_or_csd( $value ) { // FixIn: 6.2.1.4. | |
| 477 | +function wpbc_clean_digit_or_csd( $value ) { | |
| 478 | 478 | |
| 479 | - if ( $value === '' ) return $value; | |
| 479 | + if ( '' === $value ) { | |
| 480 | + return $value; | |
| 481 | + } | |
| 480 | 482 | |
| 481 | - | |
| 482 | 483 | if ( is_array( $value ) ) { |
| 483 | 484 | foreach ( $value as $key => $check_value ) { |
| 484 | 485 | $value[ $key ] = wpbc_clean_digit_or_csd( $check_value ); |
| 485 | 486 | } |
| @@ -487,16 +488,16 @@ | ||
| 487 | 488 | } |
| 488 | 489 | |
| 489 | 490 | $value = str_replace( ';', ',', $value ); |
| 490 | 491 | |
| 491 | - $array_of_nums = explode(',', $value); | |
| 492 | + $array_of_nums = explode( ',', $value ); | |
| 492 | 493 | |
| 493 | 494 | $result = array(); |
| 494 | - foreach ($array_of_nums as $check_element) { | |
| 495 | + foreach ( $array_of_nums as $check_element ) { | |
| 496 | + $result[] = intval( $check_element ); // FixIn: 8.0.2.10. | |
| 497 | + } | |
| 498 | + $result = implode( ',', $result ); | |
| 495 | 499 | |
| 496 | - $result[] = intval( $check_element ); // FixIn: 8.0.2.10. | |
| 497 | - } | |
| 498 | - $result = implode(',', $result ); | |
| 499 | 500 | return $result; |
| 500 | 501 | } |
| 501 | 502 | |
| 502 | 503 | |