Problem/Motivation

As described in
https://github.com/civictheme/civictheme_drupaltheme/blob/main/src/Drush...

But getting an error:

[error]  TypeError: Drupal\civictheme\Color\CivicthemeColorUtility::mix(): Argument #3 ($range) must be of type int, string given, called in /app/web/themes/contrib/civictheme/src/Color/CivicthemeColorShadeFilter.php on line 32 in Drupal\civictheme\Color\CivicthemeColorUtility::mix() (line 69 of /app/web/themes/contrib/civictheme/src/Color/CivicthemeColorUtility.php) #0 /app/web/themes/contrib/civictheme/src/Color/CivicthemeColorShadeFilter.php(32): Drupal\civictheme\Color\CivicthemeColorUtility::mix()

https://github.com/civictheme/civictheme_drupaltheme/blob/main/src/Color...

That parameter is set as a string, but it is expected to be an int.

Where is the int supposed to come from as the original command executed does not assume any ints?
drush civictheme:set-brand-colors --include=/app/web/themes/contrib/civictheme/src/Drush "#ff0000" "#00ff00" "#0000ff" "#ffff00" "#00ffff" "#ff00ff"

Steps to reproduce

Proposed resolution

Comments

fionamorrison23 created an issue. See original summary.

barbun’s picture

Issue summary: View changes
barbun’s picture

Issue summary: View changes
fionamorrison23’s picture

Assigned: Unassigned » joshua1234511

alex.skrypnyk’s picture

Confirming that this is reproducible: there is no checks that the passed args are numerical and there is no type casting; also, the tests do not cover enough case, so will be extending those.

alex.skrypnyk’s picture

Status: Active » Fixed

Fixed an released in 1.7.1

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.