From c40c695d20596a215a5ba1f44deef5f352bafaad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Sun, 27 Dec 2015 14:58:07 +0100 Subject: [PATCH] FIX #4036 Direct printing module without any driver configured, shows an unformatted error message --- htdocs/core/class/dolprintipp.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/dolprintipp.class.php b/htdocs/core/class/dolprintipp.class.php index fdd0fc2732c..869b26e2f75 100644 --- a/htdocs/core/class/dolprintipp.class.php +++ b/htdocs/core/class/dolprintipp.class.php @@ -66,7 +66,7 @@ class dolprintIPP */ function list_jobs($module) { - global $conf, $db, $bc; + global $conf, $db, $bc, $langs; include_once DOL_DOCUMENT_ROOT.'/includes/printipp/CupsPrintIPP.php'; $ipp = new CupsPrintIPP(); $ipp->setLog(DOL_DATA_ROOT.'/printipp.log','file',3); // logging very verbose @@ -96,7 +96,8 @@ class dolprintIPP } catch(Exception $e) { - print $e->getMessage(); + setEventMessage('[printipp] '.$langs->trans('CoreErrorMessage'), 'errors'); + dol_syslog($e->getMessage(), LOG_ERR); } print '';