php-fit-file-analysis icon indicating copy to clipboard operation
php-fit-file-analysis copied to clipboard

Deprecated: Constant FILTER_SANITIZE_STRING is deprecated

Open teibaz opened this issue 1 year ago • 0 comments
trafficstars

Currently phpFITFileAnalysis contains a line (line 1476): filter_var($tmp_value, FILTER_SANITIZE_STRING);

According php manual this is deprecated as of PHP 8.1.0. It's recommended to use htmlspecialchars() instead. Everything works just fine if we would replace that to: $this->data_mesgs[$this->data_mesg_info[$this->defn_mesgs[$local_mesg_type]['global_mesg_num']]['mesg_name']][$this->data_mesg_info[$this->defn_mesgs[$local_mesg_type]['global_mesg_num']]['field_defns'][$field_defn['field_definition_number']]['field_name']][] = htmlspecialchars( (string)$tmp_value );

teibaz avatar Sep 13 '24 07:09 teibaz