Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #57246


Ignore:
Timestamp:
12/02/2022 11:03:27 PM (17 months ago)
Author:
sabernhardt
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #57246 – Description

    v2 v3  
    1 The function `wp_get_duotone_filter_svg` and/or `wp_tinycolor_string_to_rgb` do not verify the format of the color code passed to it.   My theme uses a CSS variable `var(--nv-text-dark-bg)`.   After getting `$color` from `string_to_rgb`, it assumes the color array has valid values.   Since the original color is not one of the expected formats, this generates the following warnings:
     1The function `wp_get_duotone_filter_svg` and/or `wp_tinycolor_string_to_rgb` do not verify the format of the color code passed to it.   My theme uses a CSS variable `var(--nv-text-dark-bg)`.   After getting `$color` from `wp_tinycolor_string_to_rgb`, it assumes the color array has valid values.   Since the original color is not one of the expected formats, this generates the following warnings:
    22{{{
    33PHP Warning:  Trying to access array offset on value of type null in /wp-includes/block-supports/duotone.php on line 422