From f20bd3fb1b26935b39a92ddf66cb2ae11462318c Mon Sep 17 00:00:00 2001 From: Virgilio Pontes Date: Thu, 7 Jun 2018 15:12:14 -0300 Subject: [PATCH] JSON driver issue Verify that username exists. So that does not display the message that the index will use json driver. --- src/JasperPHP/JasperPHP.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/JasperPHP/JasperPHP.php b/src/JasperPHP/JasperPHP.php index da8e655..1414104 100644 --- a/src/JasperPHP/JasperPHP.php +++ b/src/JasperPHP/JasperPHP.php @@ -102,8 +102,10 @@ public function process($input_file, $output_file = false, $format = array("pdf" if( count($db_connection) > 0 ) { $command .= " -t " . $db_connection['driver']; - $command .= " -u " . $db_connection['username']; + if( isset($db_connection['username']) && !empty($db_connection['username']) ) + $command .= " -u " . $db_connection['username']; + if( isset($db_connection['password']) && !empty($db_connection['password']) ) $command .= " -p " . $db_connection['password'];