Make WordPress Core

Changeset 57652

Timestamp:
02/18/2024 02:57:23 PM (5 months ago)
Author:
swissspidy
Message:

Editor: Prevent PHP warning when parsing duotone hue values.

Props jacobcassidy, rahmohn, mukesh27.
Fixes #59496.

Location:
trunk
Files:
2 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;
  • trunk/tests/phpunit/tests/block-supports/duotone.php

    r57062 r57652  
    66 * @group block-supports
    77 *
    8  * @package WordPress
     8 * @
    99 */
    1010
     
    167167        );
    168168    }
     169
     170
     171
     172
     173
     174
     175
     176
     177
     178
     179
     180
     181
     182
     183
     184
     185
     186
     187
     188
     189
     190
     191
     192
     193
     194
     195
     196
    169197}
Note: See TracChangeset for help on using the changeset viewer.