PHP 8.0 Deprecated message for hex conversion when RGBA colour format is used in theme options

Hello,

On line 1467 of functions/theme-functions.php there is a conversion function to change hex2rgba.

This does not take into account the possibility of the colour value already being in rgba.

For example, in the theme options, the below is set:

However, this throws the following PHP warning:

PHP message: PHP Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/domain/public/wp-content/themes/betheme/functions/theme-functions.php on line 1467PHP message: PHP Deprecated: Invalid characters passed for attempted conversion, these have been ignored in /www/domain/public/wp-content/themes/betheme/functions/theme-functions.php on line 1469

Can you please allow for the input of rgba within all colour fields for a feature request, but most importantly add a check within the mfn_hex2rgba function to bypass if the value is already rgba?

Comments

Sign In or Register to comment.