Make WordPress Core


Ignore:
Timestamp:
02/18/2024 02:57:23 PM (2 years ago)
Author:
swissspidy
Message:

Editor: Prevent PHP warning when parsing duotone hue values.

Props jacobcassidy, rahmohn, mukesh27.
Fixes #59496.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-duotone.php

    r57135 r57652  
    210210        );
    211211
    212         $factor = $angle_units[ $unit ];
    213         if ( ! $factor ) {
    214             $factor = 1;
    215         }
     212        $factor = isset( $angle_units[ $unit ] ) ? $angle_units[ $unit ] : 1;
    216213
    217214        return (float) $value * $factor;
Note: See TracChangeset for help on using the changeset viewer.