PluginProbe
Booking Calendar / 11.8.3
Booking Calendar v11.8.3
11.8.4 11.8.3 11.8.2 11.8.1 11.8 11.7 11.6.1 11.6 11.5 11.4.3 11.4.2 11.4.1 11.4 11.3 11.2.1 11.2 11.1 11.0 10.15.7 10.15.6 10.1.3 10.10 10.10.1 10.10.2 10.11 All 204 releases
← All changes | includes/_functions/sanitizing.php +9 -8 10.11.211.8.3 View file →
@@ -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