Closed (fixed)
Project:
CivicTheme Design System
Version:
1.7.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
11 Apr 2024 at 03:45 UTC
Updated:
28 Apr 2024 at 20:59 UTC
Jump to comment: Most recent
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"
Comments
Comment #2
barbun commentedComment #3
barbun commentedComment #4
fionamorrison23 commentedComment #6
alex.skrypnykConfirming 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.
Comment #7
alex.skrypnykFixed an released in 1.7.1