Log CUPS print error on Receipt Printer module

Important help to debug errors on CUPS printing
This commit is contained in:
andreubisquerra 2020-03-30 19:32:23 +02:00 committed by GitHub
parent d2bfc5f6dc
commit 493e07a14e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,6 +78,7 @@ class CupsPrintConnector implements PrintConnector
// Build command to work on data
$tmpfname = tempnam(sys_get_temp_dir(), 'print-');
if ($tmpfname==false) dol_syslog("CupsPrintConnector.php::Permission denied to write into target directory ".sys_get_temp_dir(), LOG_WARNING);
file_put_contents($tmpfname, $data);
$cmd = sprintf(
"lp -d %s %s",