Browse Source

Update subscription.php

Laurent Destailleur 4 years ago
parent
commit
aa21af27db
1 changed files with 1 additions and 1 deletions
  1. 1 1
      htdocs/adherents/subscription.php

+ 1 - 1
htdocs/adherents/subscription.php

@@ -333,7 +333,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
 				$listofpaths = array();
 				$listofnames = array();
 				$listofmimes = array();
-				if (is_object($object->invoice) && is_object($arraydefaultmessage) && intval($arraydefaultmessage->joinfiles)) {
+				if (is_object($object->invoice) && (!is_object($arraydefaultmessage) || intval($arraydefaultmessage->joinfiles))) {
 					$invoicediroutput = $conf->facture->dir_output;
 					$fileparams = dol_most_recent_file($invoicediroutput.'/'.$object->invoice->ref, preg_quote($object->invoice->ref, '/').'[^\-]+');
 					$file = $fileparams['fullname'];