From e4d28c81a77bea426a7aaa593c4ccebec32edc4d Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Mon, 15 Jul 2013 21:33:54 +0200
Subject: [PATCH] Fix: Bad string

---
 scripts/invoices/rebuild_merge_pdf.php | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/scripts/invoices/rebuild_merge_pdf.php b/scripts/invoices/rebuild_merge_pdf.php
index f42f2830445..865adcfe336 100755
--- a/scripts/invoices/rebuild_merge_pdf.php
+++ b/scripts/invoices/rebuild_merge_pdf.php
@@ -186,20 +186,22 @@ foreach ($argv as $key => $value)
     if ($value == 'filter=excludethirdparties')
     {
     	$found=true;
-    	$option.=(empty($option)?'':'_').'excludethirdparties'.explode('-',$argv[$key+1]);
     	$filter[]='excludethirdparties';
 
     	$thirdpartiesid=explode(',',$argv[$key+1]);
     	print 'Exclude thirdparties with id in list ('.join(',',$thirdpartiesid).").\n";
+
+    	$option.=(empty($option)?'':'_').'excludethirdparties'.join('-',$thirdpartiesid);
     }
     if ($value == 'filter=onlythirdparties')
     {
     	$found=true;
-    	$option.=(empty($option)?'':'_').'onlythirdparty'.explode('-',$argv[$key+1]);
     	$filter[]='onlythirdparties';
 
     	$thirdpartiesid=explode(',',$argv[$key+1]);
     	print 'Only thirdparties with id in list ('.join(',',$thirdpartiesid).").\n";
+
+    	$option.=(empty($option)?'':'_').'onlythirdparty'.join('-',$thirdpartiesid);
     }
 
 	if (! $found && preg_match('/filter=/i',$value))
-- 
GitLab