@@ -85,7 +85,7 @@ public function process($input_file, $output_file = false, $format = array('pdf'
8585 if ( $ output_file !== false )
8686 $ command .= ' -o ' . "\"$ output_file \"" ;
8787
88- if ( is_array ($ format ) )
88+ if ( is_array ($ format ) )
8989 $ command .= ' -f ' . join (' ' , $ format );
9090 else
9191 $ command .= ' -f ' . $ format ;
@@ -96,11 +96,13 @@ public function process($input_file, $output_file = false, $format = array('pdf'
9696 if ( count ($ parameters ) > 0 )
9797 {
9898 $ command .= ' -P ' ;
99+
99100 foreach ($ parameters as $ key => $ value )
100101 {
101- $ param = $ key . '= ' . $ value . ' ' ;
102- $ command .= "\" $ param\" " ;
102+ $ param = $ key . '=" ' . $ value . '" ' ;
103+ $ command .= " " . $ param. " " ;
103104 }
105+
104106 }
105107
106108 if ( count ($ db_connection ) > 0 )
@@ -128,7 +130,7 @@ public function process($input_file, $output_file = false, $format = array('pdf'
128130 if ( isset ($ db_connection ['jdbc_url ' ]) && !empty ($ db_connection ['jdbc_url ' ]) )
129131 $ command .= ' --db-url ' . $ db_connection ['jdbc_url ' ];
130132
131- if ( isset ($ db_connection ['jdbc_dir ' ]) && !empty ($ db_connection ['jdbc_dir ' ]) )
133+ if ( isset ($ db_connection ['jdbc_dir ' ]) && !empty ($ db_connection ['jdbc_dir ' ]) )
132134 $ command .= ' --jdbc-dir ' . $ db_connection ['jdbc_dir ' ];
133135
134136 if ( isset ($ db_connection ['db_sid ' ]) && !empty ($ db_connection ['db_sid ' ]) )
@@ -137,7 +139,7 @@ public function process($input_file, $output_file = false, $format = array('pdf'
137139 if ( isset ($ db_connection ['xml_xpath ' ]) )
138140 $ command .= ' --xml-xpath ' . $ db_connection ['xml_xpath ' ];
139141
140- if ( isset ($ db_connection ['data_file ' ]) )
142+ if ( isset ($ db_connection ['data_file ' ]) )
141143 $ command .= ' --data-file ' . $ db_connection ['data_file ' ];
142144
143145 }
0 commit comments