Merge pull request #5303 from davecivicrm/CRM-15578b
[civicrm-core.git] / CRM / Badge / BAO / Badge.php
index 14611420375e8cbe8fa4d8a045b99999a135a916..21972d54938408c97f8f8c52e0c1b2a594982401 100644 (file)
@@ -21,7 +21,7 @@
  | GNU Affero General Public License or the licensing of CiviCRM,     |
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
-*/
+ */
 
 /**
  *
@@ -43,7 +43,7 @@ class CRM_Badge_BAO_Badge {
   public $border = 0;
 
   /**
-   *  This function is called to create name label pdf
+   *  This function is called to create name label pdf.
    *
    * @param array $participants
    *   Associated array with participant info.
@@ -75,7 +75,7 @@ class CRM_Badge_BAO_Badge {
   }
 
   /**
-   * Funtion to create structure and add meta data according to layout
+   * Funtion to create structure and add meta data according to layout.
    *
    * @param array $row
    *   Row element that needs to be formatted.
@@ -208,7 +208,7 @@ class CRM_Badge_BAO_Badge {
       $startOffset = CRM_Utils_Array::value('height_image_2', $formattedRow);
     }
 
-    if (CRM_Utils_Array::value('participant_image', $formattedRow)) {
+    if (!empty($formattedRow['participant_image'])) {
       $imageAlign = 0;
       switch (CRM_Utils_Array::value('alignment_participant_image', $formattedRow)) {
         case 'R':
@@ -356,7 +356,7 @@ class CRM_Badge_BAO_Badge {
   }
 
   /**
-   * Helper function to print images
+   * Helper function to print images.
    *
    * @param string $img
    *   Image url.
@@ -493,4 +493,5 @@ class CRM_Badge_BAO_Badge {
     $eventBadgeClass = new CRM_Badge_BAO_Badge();
     $eventBadgeClass->createLabels($rows, $layoutInfo);
   }
+
 }