mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
update tcpdf to v6.2.26 (php 7.3 compatibility)
This commit is contained in:
@@ -740,16 +740,6 @@ class PDF417 {
|
||||
* @protected
|
||||
*/
|
||||
protected function getErrorCorrectionLevel($ecl, $numcw) {
|
||||
// get maximum correction level
|
||||
$maxecl = 8; // starting error level
|
||||
$maxerrsize = (928 - $numcw); // available codewords for error
|
||||
while ($maxecl > 0) {
|
||||
$errsize = (2 << $ecl);
|
||||
if ($maxerrsize >= $errsize) {
|
||||
break;
|
||||
}
|
||||
--$maxecl;
|
||||
}
|
||||
// check for automatic levels
|
||||
if (($ecl < 0) OR ($ecl > 8)) {
|
||||
if ($numcw < 41) {
|
||||
@@ -764,6 +754,16 @@ class PDF417 {
|
||||
$ecl = $maxecl;
|
||||
}
|
||||
}
|
||||
// get maximum correction level
|
||||
$maxecl = 8; // starting error level
|
||||
$maxerrsize = (928 - $numcw); // available codewords for error
|
||||
while ($maxecl > 0) {
|
||||
$errsize = (2 << $ecl);
|
||||
if ($maxerrsize >= $errsize) {
|
||||
break;
|
||||
}
|
||||
--$maxecl;
|
||||
}
|
||||
if ($ecl > $maxecl) {
|
||||
$ecl = $maxecl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user