Trim the contact name for pdf output.
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 19 Sep 2018 16:45:57 +0000 (12:45 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 19 Sep 2018 16:45:57 +0000 (12:45 -0400)
If there's nothing there then don't output.

models/front/events/pdfCreator.php

index de0ef0b..b1fa1c5 100644 (file)
@@ -164,7 +164,7 @@ foreach ( $events as $eventId => $event ) {
 
     // check for phone, url or email to output
     $contactInfo = array();
-    if ( $event['contact_name'] ) {
+    if ( trim( $event['contact_name'] ) ) {
         $contactInfo[] = $event['contact_name'];
     }
     if ( $event['contact_phone'] ) {