CRM-16740 - No possibility to select "no premium image"
authorSeb35 <seb35wikipedia@gmail.com>
Wed, 24 Jun 2015 14:35:40 +0000 (16:35 +0200)
committerSeb35 <seb35wikipedia@gmail.com>
Wed, 24 Jun 2015 14:35:40 +0000 (16:35 +0200)
CRM/Contribute/BAO/ManagePremiums.php

index cac1213f611e6585161f49db7de87e05a9029be1..2f048ab6e4e3f7ef9f51b28da2f342cb82be8f69 100644 (file)
@@ -102,7 +102,7 @@ class CRM_Contribute_BAO_ManagePremiums extends CRM_Contribute_DAO_Product {
     // CRM-14283 - strip protocol and domain from image URLs
     $image_type = array('image', 'thumbnail');
     foreach ($image_type as $key) {
-      if (isset($params[$key])) {
+      if (isset($params[$key]) && $params[$key]) {
         $parsedURL = explode('/', $params[$key]);
         $pathComponents = array_slice($parsedURL, 3);
         $params[$key] = '/' . implode('/', $pathComponents);