diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index c7b5e0cd8fc..c5487f67273 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -62,6 +62,13 @@ In htdocs/includes/tcpdf/tcpdf.php * Renamed getmypid into dol_getmypid(). +To avoid to have QRcode changed because generated with a random mask, replace +define('QR_FIND_FROM_RANDOM', 2); +with +define('QR_FIND_FROM_RANDOM', false); + + + TCPDI: ------ Add fpdf_tpl.php 1.2 diff --git a/htdocs/includes/tecnickcom/tcpdf/include/barcodes/qrcode.php b/htdocs/includes/tecnickcom/tcpdf/include/barcodes/qrcode.php index 7ef2759fd6f..9165222e727 100644 --- a/htdocs/includes/tecnickcom/tcpdf/include/barcodes/qrcode.php +++ b/htdocs/includes/tecnickcom/tcpdf/include/barcodes/qrcode.php @@ -236,7 +236,7 @@ if (!defined('QRCODEDEFS')) { /** * if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly */ - define('QR_FIND_FROM_RANDOM', 2); + define('QR_FIND_FROM_RANDOM', false); /** * when QR_FIND_BEST_MASK === false @@ -730,7 +730,7 @@ class QRcode { $this->eccLength = $this->rsEccLength($spec); $this->ecccode = array_fill(0, $this->eccLength, 0); $this->blocks = $this->rsBlockNum($spec); - $ret = $this->init($spec); + $ret = $this->init($spec); if ($ret < 0) { return NULL; }