Problem

The usage of the gradient parameter in the theme settings does not properly check for a non existent theme setting. This causes output to be generated even when the setting is not set. Because the default output with a non-existent value results in the values used for 0, there is no hero gradient being applied.

An isset check is performed but the variable is set a line earlier so this check will always be true.

This change was introduced in #3044302: As a SM I want to be able to control the gradient of the hero.

Solution

Properly utilise the return value of the get-theme setting to check whether we have a usable value instead of using isset. The cast to integer is also not needed because it will be output as string.

Comments

Kingdutch created an issue. See original summary.

Kingdutch’s picture

Assigned: Kingdutch » Unassigned
Status: Active » Needs review

  • ronaldtebrake authored 39b2d92 on 8.x-6.x
    Merge pull request #1351 from goalgorilla/bugfix/3051436
    
    Issue #3051436...
  • Kingdutch committed bb95549 on 8.x-6.x
    Issue #3051436 by Kingdutch: Sub-theme hero gradient broken
    

jaapjan’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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