| @@ -165,12 +165,14 @@ | ||
| 165 | 165 | * |
| 166 | 166 | * @return void |
| 167 | 167 | */ |
| 168 | 168 | private function remove_commas_from_number( &$args ) { |
| 169 | - if ( str_contains( $args['value'], ',' ) ) { | |
| 170 | - $args['value'] = str_replace( ',', '', $args['value'] ); | |
| 171 | - FrmEntriesHelper::set_posted_value( $this->field, $args['value'], $args ); | |
| 169 | + if ( ! str_contains( $args['value'], ',' ) ) { | |
| 170 | + return; | |
| 172 | 171 | } |
| 172 | + | |
| 173 | + $args['value'] = str_replace( ',', '', $args['value'] ); | |
| 174 | + FrmEntriesHelper::set_posted_value( $this->field, $args['value'], $args ); | |
| 173 | 175 | } |
| 174 | 176 | |
| 175 | 177 | /** |
| 176 | 178 | * Force the value to be numeric before it's saved in the DB |