@@ -46,8 +46,9 @@ |
||
46 | 46 | parent::to_json(); |
47 | 47 | |
48 | 48 | $this->json['choicesLength'] = 0; |
49 | - if ( is_array( $this->choices ) && count( $this->choices ) ) |
|
50 | - $this->json['choicesLength'] = count( $this->choices ); |
|
49 | + if ( is_array( $this->choices ) && count( $this->choices ) ) { |
|
50 | + $this->json['choicesLength'] = count( $this->choices ); |
|
51 | + } |
|
51 | 52 | |
52 | 53 | $values = $this->value() == '' ? array_keys( $this->choices ) : $this->value(); |
53 | 54 | $filtered_values = array(); |