| @@ -208,9 +208,11 @@ | ||
| 208 | 208 | |
| 209 | 209 | if ( ! empty( $data['expiration'] ) |
| 210 | 210 | && is_string( $data['expiration'] ) |
| 211 | 211 | ) { |
| 212 | - $data_checked['expiration'] = $data['expiration']; | |
| 212 | + $data_checked['expiration'] = sanitize_text_field( | |
| 213 | + $data['expiration'] | |
| 214 | + ); | |
| 213 | 215 | } |
| 214 | 216 | } |
| 215 | 217 | |
| 216 | 218 | // Set data in DB cache (option) |
| @@ -311,9 +313,9 @@ | ||
| 311 | 313 | $features = array(); |
| 312 | 314 | |
| 313 | 315 | if ( ! empty( $data['features'] ) && is_array( $data['features'] ) ) { |
| 314 | 316 | foreach ( $data['features'] as $feature_name => $feature_allow ) { |
| 315 | - if ( $feature_allow && in_array( $feature_name, $all ) ) { | |
| 317 | + if ( $feature_allow && in_array( $feature_name, $all, true ) ) { | |
| 316 | 318 | $features[] = $feature_name; |
| 317 | 319 | } |
| 318 | 320 | } |
| 319 | 321 | } |
| @@ -328,9 +330,9 @@ | ||
| 328 | 330 | * @param string $feature_name |
| 329 | 331 | * @return bool |
| 330 | 332 | */ |
| 331 | 333 | function wplng_api_feature_is_allow( $feature_name ) { |
| 332 | - return in_array( $feature_name, wplng_get_api_feature() ); | |
| 334 | + return in_array( $feature_name, wplng_get_api_feature(), true ); | |
| 333 | 335 | } |
| 334 | 336 | |
| 335 | 337 | |
| 336 | 338 | /** |