Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.6.4
-
Fix Version/s: 4.7
-
Component/s: CiviContribute
-
Labels:None
-
Documentation Required?:None
-
Funding Source:Contributed Code
Description
On the premium configuration page, when you select "no image", the saved setting is an image whose URL is "/". This is not "no image" but "an image located at /", which is incorrect. Tested on CiviCRM 4.6.4 with Wordpress, but it is probably plateform-independant.
I fixed it locally but I never submitted a patch to CiviCRM, so below is the fix and I will try to submit myself the patch in the next weeks. The issue comes from the fact "no image" should be stored as an empty URL but, during the saving, the URL is normalized and an empty URL is not kept as it but replaced by "/" during the normalization.
In class CRM_Contribute_BAO_ManagePremiums, in function add, replace:
- if (isset($params[$key])) {
+ if (isset($params[$key]) && $params[$key]) {