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
Comment #2
KingdutchPR here: https://github.com/goalgorilla/open_social/pull/1351
Comment #7
jaapjan CreditAttribution: jaapjan as a volunteer and at Open Social commented