mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 20:24:26 +00:00
Editor: Prevent PHP warning when parsing duotone hue values.
Props jacobcassidy, rahmohn, mukesh27. Fixes #59496. git-svn-id: https://develop.svn.wordpress.org/trunk@57652 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -209,10 +209,7 @@ class WP_Duotone {
|
||||
'rad' => 360 / ( M_PI * 2 ),
|
||||
);
|
||||
|
||||
$factor = $angle_units[ $unit ];
|
||||
if ( ! $factor ) {
|
||||
$factor = 1;
|
||||
}
|
||||
$factor = isset( $angle_units[ $unit ] ) ? $angle_units[ $unit ] : 1;
|
||||
|
||||
return (float) $value * $factor;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user